Could it help? Just strip away completely the upkeep calculations from trade resource entirely and increase it on alloys (would also lower the amount of ships if alloy upkeep is higher) instead.
What do you think?
What do you think?
- 1
- 1
Since the lag seems to have to do with number of fleets, we're probably not looking at something as trivial as adding up a couple numbers per fleet. It's most likely calculations about what the AI should be doing with fleets.
Let's say the AI has just 1 fleet and two places it's calculated need support. Easy. Just 2 options to consider. Let's say it has 2 fleets. That's 4 options (maybe it's better to have both fleets in one location and leave one undefended). 10 fleets? That's 1000 options. 5 locations for 10 fleets? That's almost 10 million combination. You can see how it's rapidly going up even if there are categories of options that can be removed.
Now the AI starts to move fleets and another AI sees it and calculates a similarly large number on how to respond. This then makes the first AI recalculate. Perhaps a bit of an extreme back and forth, but late game there's a lot more than 10 fleets.
That's probably related, if I had to guess. Fewer fleets would dramatically cut down these calculations. Now there are other options such as the AI grouping fleets together. Maybe it already does this but not enough.
It's possible there's some sort of animation or movement simulation issue that hits numbers of fleets in a way that doesn't hit the same number of ships in fewer fleets too.
Edit: As someone who's name starts with an A* said in another post, economy increases that came with 4.0 also mean more ships so could have made performance issues that were minor into much bigger ones by dramatically increasing the number of fleets.
*I'm really bad with names.
Edit2: pretty sure it was Abdulijubjub
Yea they aren't simple, path finding is actually a crazy expensive operation in general and as far as I know stellaris isn't using an optimized version that does bidirectional search. (People say that lgates and other shortcuts slow down pathing which is only true in single directional search not bi directional).remember a very long while back the trade routes calculations were causing lag even though conceptually speaking they were very simple static lines
Indeed pathing is a major contributer and why reducing the number of fleets helps with lag. Some time ago in a previous round of performance discussions, a dev confirmed that they do cache paths, but they have to recalculate every time a new bypass is added, such as a gateway.Stellaris ups the cost a lot because if you can fly through an area or not isn't actually fixed and changes regularly. So a cache for a specific path breaks often.
Not so sure by this tbh.Also small pop groups are probably a large contributor to late game lag as well.
This should be orders of magnitude smaller now, so I don't think this is a major factor.Also small pop groups are probably a large contributor to late game lag as well.
It's not AI related.Since the lag seems to have to do with number of fleets, we're probably not looking at something as trivial as adding up a couple numbers per fleet. It's most likely calculations about what the AI should be doing with fleets.
Let's say the AI has just 1 fleet and two places it's calculated need support. Easy. Just 2 options to consider. Let's say it has 2 fleets. That's 4 options (maybe it's better to have both fleets in one location and leave one undefended). 10 fleets? That's 1000 options. 5 locations for 10 fleets? That's almost 10 million combination. You can see how it's rapidly going up even if there are categories of options that can be removed.
Now the AI starts to move fleets and another AI sees it and calculates a similarly large number on how to respond. This then makes the first AI recalculate. Perhaps a bit of an extreme back and forth, but late game there's a lot more than 10 fleets.
That's probably related, if I had to guess. Fewer fleets would dramatically cut down these calculations. Now there are other options such as the AI grouping fleets together. Maybe it already does this but not enough.
It's possible there's some sort of animation or movement simulation issue that hits numbers of fleets in a way that doesn't hit the same number of ships in fewer fleets too.
Edit: As someone who's name starts with an A* said in another post, economy increases that came with 4.0 also mean more ships so could have made performance issues that were minor into much bigger ones by dramatically increasing the number of fleets.
*I'm really bad with names.
Edit2: pretty sure it was Abdulijubjub
It is. The pop rework did work in many specific aspectsThis should be orders of magnitude smaller now, so I don't think this is a major factor.
That doesn't actually guarantee that it isn't AI, because it might be making decisions based on those fleets and it might be using too much performance depending on how it does so.It's not AI related.
I tested for this: if you have lots of fleets, even just lying around starbases and not moving you get lag. I had a save with 50 fleets.
Once I disbanded all of them, the game sped up like x5.
You can just turn the AI off with the console?That doesn't actually guarantee that it isn't AI, because it might be making decisions based on those fleets and it might be using too much performance depending on how it does so.
If you still have the save, use the console to turn the AI entirely off and see if that also removes the lag. If it doesn't, yeah, the AI isn't a problem (at least, not compared to fleets), but it might well also work to remove the lag.
it is!You can just turn the AI off with the console?
It would be really weird if it's just fleets existing. Not impossible. That would be some sort of mess on the engine that needs to get fixed.
Seems the command to turn off ai is just 'ai'. It's under cheats.it is!
note: these fleets were all full of ships up to the command cap: around 300-400, with mixed hull sizes.