beyond-all-reason / spring

A powerful free cross-platform RTS game engine
https://beyond-all-reason.github.io/spring/
Other
222 stars 102 forks source link

1821 (+2131?) Starlight unreasonably destroys lategame performance #1106

Open GoogleFrog opened 11 months ago

GoogleFrog commented 11 months ago

I and others have noticed Starlight destroying performance in recent months. I don't recall it being this bad in previous years A Starlight firing puts Sim::MapDamage::Los to 15-20% CPU usage. With two the load jumped to 28%. The game had about 1700 units at this time. This is the game http://zero-k.info/Battles/Detail/1769993

screen00004

I was unable to reproduce by saving all the units at that point and spawning them into a game. screen00006

Not even with a lot more Starlights. Sim::MapDamage::Los becomes noticeable a around 12%, but this is with eight Starlights. This is the unreasonable part, for some reason two Starlights 35 minutes into the game cost a lot more performance than eight spawned at the start, alongside similar unit counts. screen00008

I was able to reproduce somewhat with an AI game, 3x resource multiplier, and four spawned Starlights when the unit count hit 1700. screen00005

I an unable to run later engines at this point.

marcushutchings commented 11 months ago

Thanks for the report. This is a known issue (https://github.com/beyond-all-reason/spring/issues/316) and is definately something I want to get around to resolving.