The crux
This is yet another thread pointing out why bad lategame performance is for a large part not caused by the Engine itself as is claimed in many places (to a degree everything is caused by the engine, so obviously the engine is ultimately responsible for good/bad performance, this is about what's causing problems even though it shouldn't be).
This has been also tested on my laptop with a much better CPU but worse GPU and the results showed the same pattern.
I can't see into the game code but the following test (which anyone is welcome to repeat and post their results) shows that it's not a CPU-related-tasks-in-the-background issue but by and large a mostly horribly-resource-consuming-way-of-dealing-with-UI-elements (which you're completely incapable of disabling to speed up the game).
Game Settings
1,000 system galaxy
Year 2276
97% of systems within somebody's borders
All mods disabled
Test Data
Original player empire (120 Planets):
Galaxy view zoomed out: 11-13 FPS
Galaxy view zoomed in (showing fleets): 11-12 FPS
Galaxy view zoomed in (showing fleets + colonies/stations): 6-7 FPS
System view: 12 FPS
30 days pass in 58 seconds
Switching control to the largest AI empire (30 Planets):
Galaxy view zoomed out: 40 FPS
Galaxy view zoomed in (showing fleets): 38-40 FPS
Galaxy view zoomed in (showing fleets + colonies/stations): 24 FPS
System view: 44 FPS
30 days pass in 45 seconds
Switching control to a small AI empire (5 Planets):
Galaxy view zoomed out: 60 FPS
Galaxy view zoomed in (showing fleets): 60 FPS
Galaxy view zoomed in (showing fleets + colonies/stations): 60 FPS
System view: 60 FPS
30 days pass in 42 seconds
Summary
You can literally make the game run 25-30% faster by simply switching to a 5-colony sized AI empire.
If the CPU-related tasks in the background were the cause of the problem, then switching to a tiny empire should make the game run significantly slower because the AI now has to deal with managing a huge empire taking up most of the galaxy.
The most obvious explanation is that what makes the game run slower isn't the galaxy progress itself, but badly coded operations:
There's probably a lot more, this is just off the top of my head and all except the first one (since that one is objectively verifiable that it happens) are speculations how exactly it works. But there's probably a lot more that falls into the same category and slows down the game exclusively due to control of the player empire rather than slowing down due to state of the galaxy as a whole.
Giving the player the ingame option to disable these (and all other related) checks/reduce their frequency would help everyone speed their lategame up significantly, as proven by the data. Wiz and others are welcome to provide input on these operations and which of them cause the largest resource hogging to enable a discussion on how they can be meaningfully tweaked.
The UI-Problem
A reason why these checks can't be the sole issue is the fact that the game slows down already by zooming in the galaxy view to show mining stations/colonies. And even if you tick the checkbox to hide mining stations the performance doesn't improve (or by a negligible fraction of the performance drop from zooming in). And all this slowdown even while the game is paused, no CPU operations simulating galaxy progress are happening.
Switch to one of your small vassals with whom you share your sensors so they see the exact same systems with the exact same number of mining stations/colonies and you immediately get a performance boost up to 40-60 FPS. This shows that it's not a GPU problem with displaying many mining stations, since the vassal sees exactly the same view as you.
Conclusion
The next time someone says that poor lategame performance in stellaris is because of the engine or CPU intensive tasks involved in running the galaxy, you'll know that they are lying or have no clue about the actual cause or how the game runs in general.
The actual reason is terrible UI implementation eating up more resources than it justifiably should by a large margin.
This is yet another thread pointing out why bad lategame performance is for a large part not caused by the Engine itself as is claimed in many places (to a degree everything is caused by the engine, so obviously the engine is ultimately responsible for good/bad performance, this is about what's causing problems even though it shouldn't be).
This has been also tested on my laptop with a much better CPU but worse GPU and the results showed the same pattern.
I can't see into the game code but the following test (which anyone is welcome to repeat and post their results) shows that it's not a CPU-related-tasks-in-the-background issue but by and large a mostly horribly-resource-consuming-way-of-dealing-with-UI-elements (which you're completely incapable of disabling to speed up the game).
Game Settings
1,000 system galaxy
Year 2276
97% of systems within somebody's borders
All mods disabled
Test Data
Original player empire (120 Planets):
Galaxy view zoomed out: 11-13 FPS
Galaxy view zoomed in (showing fleets): 11-12 FPS
Galaxy view zoomed in (showing fleets + colonies/stations): 6-7 FPS
System view: 12 FPS
30 days pass in 58 seconds
Switching control to the largest AI empire (30 Planets):
Galaxy view zoomed out: 40 FPS
Galaxy view zoomed in (showing fleets): 38-40 FPS
Galaxy view zoomed in (showing fleets + colonies/stations): 24 FPS
System view: 44 FPS
30 days pass in 45 seconds
Switching control to a small AI empire (5 Planets):
Galaxy view zoomed out: 60 FPS
Galaxy view zoomed in (showing fleets): 60 FPS
Galaxy view zoomed in (showing fleets + colonies/stations): 60 FPS
System view: 60 FPS
30 days pass in 42 seconds
Summary
You can literally make the game run 25-30% faster by simply switching to a 5-colony sized AI empire.
If the CPU-related tasks in the background were the cause of the problem, then switching to a tiny empire should make the game run significantly slower because the AI now has to deal with managing a huge empire taking up most of the galaxy.
The most obvious explanation is that what makes the game run slower isn't the galaxy progress itself, but badly coded operations:
- daily/constant sector AI checks which pops it should move onto wrong tiles against your will (as opposed to monthly checks)
- daily/constant checks running against your planets to let you know which planet generates too much unrest (as opposed to monthly checks)
- daily/constant checks which of your hundreds of systems within your radar range now contains an enemy fleet (as opposed to monthly checks)
- daily/constant checks running against your planets to let you know which planet generates too much unrest (as opposed to monthly checks)
- daily/constant checks which of your hundreds of systems within your radar range now contains an enemy fleet (as opposed to monthly checks)
There's probably a lot more, this is just off the top of my head and all except the first one (since that one is objectively verifiable that it happens) are speculations how exactly it works. But there's probably a lot more that falls into the same category and slows down the game exclusively due to control of the player empire rather than slowing down due to state of the galaxy as a whole.
Giving the player the ingame option to disable these (and all other related) checks/reduce their frequency would help everyone speed their lategame up significantly, as proven by the data. Wiz and others are welcome to provide input on these operations and which of them cause the largest resource hogging to enable a discussion on how they can be meaningfully tweaked.
The UI-Problem
A reason why these checks can't be the sole issue is the fact that the game slows down already by zooming in the galaxy view to show mining stations/colonies. And even if you tick the checkbox to hide mining stations the performance doesn't improve (or by a negligible fraction of the performance drop from zooming in). And all this slowdown even while the game is paused, no CPU operations simulating galaxy progress are happening.
Switch to one of your small vassals with whom you share your sensors so they see the exact same systems with the exact same number of mining stations/colonies and you immediately get a performance boost up to 40-60 FPS. This shows that it's not a GPU problem with displaying many mining stations, since the vassal sees exactly the same view as you.
Conclusion
The next time someone says that poor lategame performance in stellaris is because of the engine or CPU intensive tasks involved in running the galaxy, you'll know that they are lying or have no clue about the actual cause or how the game runs in general.
The actual reason is terrible UI implementation eating up more resources than it justifiably should by a large margin.