beyond-all-reason / beyond-all-reason/RecoilEngine
1821 (+2131?) Starlight unreasonably destroys lategame performance
- Dominant language
- C++
- Stars
- 679
- Forks
- 290
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 40
Description
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

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

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.

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

I an unable to run later engines at this point.
Contributor guide
Research direction
Start with the reported Sim::MapDamage::Los hotspot and compare the linked battle with the provided reproduction attempts. Investigate why late-game Starlight firing scales differently from many Starlights spawned at game start; done means reproducing the regression, identifying its cause, and confirming improved performance without changing behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- game-dev, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100