Page 1 of 1

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

Posted: Wed Nov 25, 2020 3:09 am
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?

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

Posted: Wed Nov 25, 2020 6:15 am
by valneq
Is this issue related to this?
viewtopic.php?f=30&t=91675

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

Posted: Wed Nov 25, 2020 7:42 am
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. :-)