Optimization/Partial Disabling of Prototype History

Post Reply
Maxreader
Burner Inserter
Burner Inserter
Posts: 13
Joined: Fri Jun 28, 2019 7:44 am
Contact:

Optimization/Partial Disabling of Prototype History

Post by Maxreader »

Greetings!

Myself and others have noticed that my latest mod, Fractured World, when used with other mods, causes load times to get much worse than just the sum of the individual load times. In particular, any mods loading after mine would slow to a crawl. It was suggested that the prototype history being dumped after each mod was the case, and disabling it indeed made load times drastically shorter. In particular, my mod produces many dozens of named noise expression prototypes, each of which is rather complex in their own right.

When used with no other mods, it's no large issue, as there are not comparatively many prototypes to log. However, one particular example given to me (with a mod list that can be provided if necessary) took over 15 minutes to load. As it currently stands, there is a config option that disables prototype history for all prototypes. However, this breaks the information given in tooltips about which mods add what, and completely scrambles the mod settings page. Given my understanding of the situation that I have outlined, I request that there be some method of disabling the prototype history for either a given type, on a particular prototype, or even prototypes generated by the entire mod.

Seeing as they are named noise expressions, there's no place that a user will ever see the history in a tooltip, so losing the history for them will have no effect on the typical user. The history would indeed be lost from the prototype explorer. However, seeing as the prototype explorer is largely a tool for mod development and I, the author of said mod, would be able to reenable the history if I ever saw the need to, this should not be a major issue either.

One other "solution" that I foresee being suggested is the prototype caching option. This does indeed speed up load times, however, it has the major caveat that it is a cache and doesn't work if you change any mods or startup settings. As such, I do not consider it to be a true solution to the issue. Otherwise, prototype history logging seems to be the source of unnecessarily long load times for mods in general, and seems like a worthy option to investigate for further optimization.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Optimization/Partial Disabling of Prototype History

Post by Rseding91 »

I know of this performance impact (it's most of what the time ends up spent on when loading mods) but I have no solution. The issue is compounded with the noise expression logic being incredibly slow and verbose with how it's defined through Lua.

It simply doesn't work to skip parts of it.

What you could do is stick your changes in the final-updates stage and give your name a "z" at the start so it runs last.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Implemented mod requests”