Page 1 of 1

[2.0.72] Performance issues when mods add many unit prototypes

Posted: Fri Oct 31, 2025 7:23 pm
by MeteorSwarm
Hello. I've noticed that mods which add new unit types have a disproportionate impact on performance, seemingly becoming an issue when spawners first become capable of spawning that unit. This issue is prevalent in Schall Endgame Evolution, which adds 12 new tiers of biter and spitters, and this mod can be a performance hog once higher tier biters start to spawn.

It's not clear to me if this performance issue can be fixed by an engine update, but given that vanilla Factorio only adds a handful of new entities, it's possible that the spawning algorithm used by the game doesn't scale very well when new unit types are added. If this is not the case, some advice on how a mod could be written to improve performance while preserving the challenge of Schall Endgame Evolution would be appreciated.

1. Open the attached save with all mods in the save enabled.
Checking performance, you will see that units consume 9-12 ms of CPU time per update.
Performance screenshot with Schall Endgame Evolution installed.
Performance screenshot with Schall Endgame Evolution installed.
Screenshot from 2025-10-31 11-50-33.png (1.92 MiB) Viewed 329 times
2. Open the attached save again, but disable "Schall Endgame Evolution" and "Schall Endgame Evolution tweaks."
Checking performance again, you will see that units consume much less UPS than before, initially only 0.1 ms per update, but rising to 3.5-4.5 ms before reaching what appears to be a steady state.
Performance screenshot with Schall Endgame Evolution disabled.
Performance screenshot with Schall Endgame Evolution disabled.
10-31-2025, 11-56-41.png (2.38 MiB) Viewed 329 times

Re: [2.0.72] Performance issues when mods add many unit prototypes

Posted: Sat Nov 01, 2025 1:47 am
by Techjar
Well the fact that there's nearly 3x as many unit entities in total with the mod installed would explain the difference in time usage. It is pretty well established that enemy units eat your UPS for breakfast.

Re: [2.0.72] Performance issues when mods add many unit prototypes

Posted: Sat Nov 01, 2025 8:19 pm
by MeteorSwarm
Techjar wrote: Sat Nov 01, 2025 1:47 am Well the fact that there's nearly 3x as many unit entities in total with the mod installed would explain the difference in time usage. It is pretty well established that enemy units eat your UPS for breakfast.
Why are you responding to this if it's well established? This doesn't communicate any information I'm not already aware of.

Re: [2.0.72] Performance issues when mods add many unit prototypes

Posted: Sat Nov 01, 2025 8:32 pm
by Rseding91
Thanks for the report however I don’t see anything here that would be qualified as a bug. Mods have changed the unit spawning behavior and now you’re getting more units and more units take more time.