Game or menu simulation? Don't run migration scripts all the time!

Post Reply
Pi-C
Smart Inserter
Smart Inserter
Posts: 1652
Joined: Sun Oct 14, 2018 8:13 am
Contact:

Game or menu simulation? Don't run migration scripts all the time!

Post by Pi-C »

The new menu simulation can be bad for performance because each time another scene is loaded, all Lua migration scripts of all active mods will be run (as I've already whined about here). This may be bad for performance if the migration changes a lot of entities, and it may cause a lot of really unnecessary log spam. (Logging stuff is good because it helps to find bugs. But logging the same things every few seconds, for all mods that are active, is bad because it makes it harder to find the output you really need.)

It would be nice if there was a way to detect if we've loaded an actual game or if we're still in the menu simulation and can skip the migrations until a real game is loaded. Any chance to get this?
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!

User avatar
valneq
Smart Inserter
Smart Inserter
Posts: 1150
Joined: Fri Jul 12, 2019 7:43 am
Contact:

Re: Game or menu simulation? Don't run migration scripts all the time!

Post by valneq »

Is this issue related to this?
viewtopic.php?f=30&t=91675

Pi-C
Smart Inserter
Smart Inserter
Posts: 1652
Joined: Sun Oct 14, 2018 8:13 am
Contact:

Re: Game or menu simulation? Don't run migration scripts all the time!

Post by Pi-C »

valneq wrote:
Wed Nov 25, 2020 6:15 am
Is this issue related to this?
viewtopic.php?f=30&t=91675
Yes. So it seems this topic can be closed. But I guess you'll agree that with the surge of new topics appearing during the last two days it was easy to overlook a post. :-)
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!

Post Reply

Return to “Implemented mod requests”