• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

Dr Pippy

Major
19 Badges
Sep 27, 2020
614
1.887
  • Stellaris: Distant Stars
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Stellaris: Federations
  • Stellaris: Lithoids
  • Age of Wonders: Planetfall
  • Stellaris: Ancient Relics
  • Stellaris: Megacorp
  • Shadowrun: Hong Kong
  • Shadowrun: Dragonfall
  • Stellaris
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Age of Wonders III
  • Stellaris: Synthetic Dawn
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Tyranny: Archon Edition
In my current playthrough, the endgame lag has become literally unplayable, by which I mean when my full fleet is in combat, a single day (not month!) will take 20-30 seconds. While different people obviously have different priorities, this is currently the primary factor reducing my enjoyment of the game. (Although the bugs and wrestling with the UI aren't too far behind.) So with the hope that performance improvements will also be a high priority for the developers, I've been making some notes that I hope can help to identify the major bottlenecks.
  • Playing on a small barred spiral galaxy (400 stars); starting with 12 AI empires, plus 2 fallen empires and a couple marauders, who are sadly no longer with us. Currently there are 6 AI empires left. GA, midgame scaling, midgame at 2300 and endgame at 2400.
  • The game ran quite smoothly up until around somewhere around 2350. The first major slowdowns occurred when two large federations went to war. (Although there were a couple times when the galcom declared a crisis, and those also seemed to run a bit slower.) In general, the game appears to run much slower during large-scale conflicts between the AIs. Even so, at this stage the game generally was able to run at least one day per second (and usually several days per second during peacetime).
  • The really bad slowdowns happened when I mobilized my fleets to fight a crisis. I've split my forces between 630 battleships (FE/carrier/WW) and 4760 missile corvettes, at least at full strength. The primary culprit here seems to be the corvettes.
  • Even moving the corvettes would cause a lag spike, but the real problem was when they'd enter combat. This was when you'd start getting days taking 20-30 seconds (I timed one at 42 seconds, but I think that might have been an outlier). This doesn't seem to be a rendering issue, as it wouldn't run any faster when I was in the galaxy view not looking at any ships.
  • Combat with the battleships didn't seem nearly as hard on the processor as the corvettes. This is maybe a little surprising because they've got over 10k strike craft between them. I need to go back and double check this, but my impression is that combat with the carrier battleships will render very slowly (<10 fps), but doesn't slow down as much on the galaxy map view.
  • I did build one million billion trillion deep space citadels and defense platforms. (Haha Eternal Vigilance goes brrrrrrrr...) I don't think those have hit the performance too much, because (1) mostly they're just sitting there (nobody's even tried to go through Terminal Egress in ages, it's actually a little disappointing); and (2) the circumstances when the game slows down seem pretty identifiable, and I've had loads of defense platforms since well before the major lag started to hit. But it's possible I'm underestimating how much of an effect these have.
I don't think I have nearly enough to go on to draw any firm conclusions, but based on what I've seen, I do have a few working hypotheses:
  • The major source of late-game performance woes is almost surely something related to fleets, ships, and space combat. I don't have hard numbers, but this seems noticeably worse than it did when I last played in 3.7 or so.
  • Based on the fact that the corvettes seemed to decrease performance more than a roughly equivalent naval cap worth of battleships, it seems very likely that the number of ships is a factor in the game's performance. So at least some of the lag is caused by having lots of ships, not having lots of fleets.
  • It's a little harder to tell what's going on with the slowdowns during conflicts between the AIs, as there's potentially a lot of factors at play: pathfinding per individual fleet, keeping track of individual ships during combat, updating AI military objectives too frequently (cf. fleets moving back and forth but not actually attacking a particular target). So I can really only speculate about what's going on here.
I'd be interested to know (1) if there are any ways I can do more systematic profiling as a player; and (2) if what I'm seeing here is consistent with other people's experiences. Hopefully this helps to track down some of the things that are making the late game a frustrating lag-fest rather than the epic space opera finale that it should be!
 
  • 8
  • 5Like
Reactions:
Snippet from save file if you zip and unzip it. The field is logistics_fleet_upkeep_costs
Code:
galaxy=
{
    template="large"
    shape="elliptical"
    num_empires=12
    num_advanced_empires=3
    num_fallen_empires=4
    num_marauder_empires=2
    habitability=1
    primitive=1
    advanced_starts_near_player=no
    caravaneers_enabled=yes
    crises=1.25
    technology=1
    traditions=1
    logistic_ceiling_v2=5
    growth_scale=0.25
    clustered=no
    random_empires=no
    random_fallen_empires=no
    random_marauder_empires=no
    random_advanced_empires=no
    core_radius=112.5
    player_locations=normal
    difficulty=grand_admiral
    aggressiveness=normal
    crisis_type=any
    scaling=scaling_mid
    technology_difficulty_scale=scaling_normal
    lgate_enabled=yes
    name="c0bb66e0-abd8-4b85-be7e-95076fef75d6"
    ironman=no
    num_gateways=1
    num_wormhole_pairs=1
    num_hyperlanes=1
    mid_game_start=100
    end_game_start=200
    victory_year=300
    num_guaranteed_colonies=2
    difficulty_adjusted_ai_modifiers=no
    cosmic_storm_early_game_spawn_chance_scale=0
    cosmic_storm_mid_game_spawn_chance_scale=0
    cosmic_storm_late_game_spawn_chance_scale=0
    cosmic_storm_early_game_spawn_max_cap=1
    cosmic_storm_mid_game_spawn_max_cap=1
    cosmic_storm_late_game_spawn_max_cap=1
    cosmic_storm_spawn_cooldown_scale=1
    cosmic_storm_devastation=1
    voidworms_scaling=0.5
    cutholoids_scaling=0.5
    logistics_fleet_upkeep_costs=1
    logistics_planet_deficit_costs=1
 
  • 3
Reactions:
I made a comment on the post about AI performance but it looks like they didn't actually migrate the difficulty bonus from GA from the global naval bonus of 100% to the actual sources. So solider jobs are now producing twice as many ships as they where a patch ago on GA. Resulting in the AI having a lot of extremely under powered ships. They basically doubled fleet count between hotfixes versions. Like one planet I am looking at the game has 1600 solider jobs producing 3663 workforce and 219 fleet cap. That then gets doubled again to 438 fleet cap. I cannot find an actual fortress world but the rough math is something like 2k fleet cap from a single 20 district one from the AI.
 

Attachments

  • Screenshot 2025-06-10 at 2.34.31 AM.png
    Screenshot 2025-06-10 at 2.34.31 AM.png
    273,6 KB · Views: 0
  • 4
Reactions:
I tested this and can spare you the mental strain. I did not see any difference in speed. With it set to 0 vs 1. That doesn't mean that it doesn't have a performance impact for the fleets themselves to be calculating their upkeep, but it does mean there is very unlikely to be any hot pathing in the code if the multiple is 0. Even if it is written in the code whatever is compiling it would probably be removing the optimization. This is outside my wheel house tho software dev wise so could be totally wrong about it being not easy to get a compiled hotpath. I only have experience with doing this in pythons compiler and that uses extremely separate functions so the hotpath is always preserved.
 
  • 2Like
Reactions:
Are you on the open beta as well Dr.Pippy or on the current public release?

I was having 1000ms-1300ms daily ticks ( pressing tilde in game ) on the open beta until yesterdays update and then it dropped to around 780ms after yesterday's patch. That said after I was gathering the League against Cetana in a system outside of her borders ready to declare war (I've not beaten her yet) and there was maybe 50 fleets of different sizes and then the FPS crawls in system view at times but to below 1 a second.

But of course the tick speed quickly went back over 1000ms in general.
 
  • 1
Reactions:
Are you on the open beta as well Dr.Pippy or on the current public release?
This was on the open beta, last night.
I was having 1000ms-1300ms daily ticks ( pressing tilde in game ) on the open beta until yesterdays update and then it dropped to around 780ms after yesterday's patch.
What command are you running to see this? I don't see an obvious choice on the console commands, but could easily be missing it! Also, by "tick" do you mean a day, or 0.1 days. (I think it defaults to 10 ticks per day. Apparently there's a command to change this that I haven't tried...)
That said after I was gathering the League against Cetana in a system outside of her borders ready to declare war (I've not beaten her yet) and there was maybe 50 fleets of different sizes...
Good luck!!
 
This was on the open beta, last night.

What command are you running to see this? I don't see an obvious choice on the console commands, but could easily be missing it! Also, by "tick" do you mean a day, or 0.1 days. (I think it defaults to 10 ticks per day. Apparently there's a command to change this that I haven't tried...)

Good luck!!

If you open the console (tilde)and enter debugtoolltip, a menu will appear. It will display the average daily ticks speed and the monthly tick. I believe what they consider a tick in this menu is 1 day = tick.

It use to be a bit more constrained in use as it didn't / couldn't take into account frame update delay but it now shows a relative delay too. I'm not my computer at the moment but it has a plethora of things to use and test with in that menu. But will turn off ability to get achievements iirc.
 
  • 2
  • 1Like
Reactions:
If you open the console (tilde)and enter debugtoolltip, a menu will appear. It will display the average daily ticks speed and the monthly tick. I believe what they consider a tick in this menu is 1 day = tick.
It's showing something like 1500 ms/tick when it's taking many seconds to get to the next day. Seems like further study is required...

In any case, I replaced my corvette fleet with a comparable naval cap worth of missile destroyers (so 2380). It's still running very, very slowly, but seems to be a bit faster than the corvettes were. Now that I know about the tick timer on the debug menu I can reload an earlier save and compare. I'm also wondering if it's maybe the missiles rather than the ships per se that are causing the slowdown.

Edit: after further investigation, I'm not seeing an obvious correlation between the reported tick rate and what's actually happening on screen. As soon as I blew up the Unbidden portal, everything started moving much faster, but the ticks stayed pretty steady at around 500 ms.
 
Last edited:
Edit: after further investigation, I'm not seeing an obvious correlation between the reported tick rate and what's actually happening on screen. As soon as I blew up the Unbidden portal, everything started moving much faster, but the ticks stayed pretty steady at around 500 ms.
Use debug_stats to get the tick rate per 30 days its a lot better and more reliable.
 
  • 1
Reactions:
Relevant video, skip to 3:10 past the preamble:

Basically: the game has too many modifiers and checks it has to do everything single day, and when you move fleets it does that multiplied by all the ships in the galaxy.

This will require a major rework in how he game functions, though not necessarily all related to user experience.

Solutions i propose:
  • Ship performance is dictated at Station Orbit exit.
    • Things like Regen Hull should let ships repair when orbiting ANY central station, as opposed to only Shipyards, thus removing in-flight daily regen.
  • Fighters, Missiles, Corvettes and Frigates stop being ships per-se and are just a system-wide damage-over-time effects where deployed.
    • These can still me graphically animated showing them fighting but they're not quantified as individual units
    • PD and S weapons would then serve as a linear counter to these. Matching PD to to these simply makes them do zero damage, while bringing more reduces/destroys them over time while fleet is in system. "Did you bring enough PD?"
    • Corvettes and Frigates would mechanically work akin to Storms, traveling between systems simply means the "storm" is migrating. Graphically the game can still animate ships traveling across the system. What counts is the internal math.
  • Different genetic templates need to modifiy ONE species proportionally, rather than having 2-4 different types of the same species with different traits. The number of different pops and species needs to be refuced significantly.
    • Example: if 20% of a species has Venerable, then leaders have +16 years instead of +80. There's only one species.
    • This may lead to lots of traits, not sure how to deal with this other than exclusify them all up.
  • All the random little modifiers like +10% job efficiency need to be removed and rolled into universal effects tied to specific buildings or stations. Tooltips like this should not exist:

    1749592297616.png
In essence: the game systems need to be SIGNIFICANTLY simplified, both in terms of the variety of systems to be rolled into the same universal modifier and for performance to simply be upgradable rather than having a bunch of similar effects recalculating all the time.
 
Fighters, Missiles, Corvettes and Frigates stop being ships per-se and are just a system-wide damage-over-time effects where deployed.
  • These can still me graphically animated showing them fighting but they're not quantified as individual units
  • PD and S weapons would then serve as a linear counter to these. Matching PD to to these simply makes them do zero damage, while bringing more reduces/destroys them over time while fleet is in system. "Did you bring enough PD?"
  • Corvettes and Frigates would mechanically work akin to Storms, traveling between systems simply means the "storm" is migrating. Graphically the game can still animate ships traveling across the system. What counts is the internal math.
Is this some kind of joke?
We already have this.
It's called strike craft.
 
  • 1
Reactions:
Okay, a bit more testing (just using a stopwatch, since I've still not quite spent the time to figure out how to interpret the numbers from debug_stats). Basically I just moved all my battleships (630) to one system, all my destroyers (2380) to another, entered "attackallfleets" and then timed how long it took for the game to advance by a day. I wanted to test the effect of missiles on the game performance, so I did one test with missile destroyers and one test where I replaced the missiles with direct fire weapons (plasma cannons, as I think I did all the refits just as the prethoryn were coming...).

I wasn't super careful with the math, so this is just a rough average over several days:

Baseline (no combat): ~0.9 sec/day
No destroyers: ~6 sec/day
Plasma artillery destroyers: ~15 sec/day
Missile destroyers: 20-30 sec/day.

All of the combat tests had FAE/carrier/WW battleships also duking it out. (And also lots of citadels/starbases/defense platforms.) I probably should rerun these and be more careful recording the numbers, and if I do I'll update this post. But a few things seem pretty clear:
  • More ships means the game runs slower, but it's not necessarily a linear relationship. Adding the destroyers increased the number of ships by a factor of 5, but (at least with direct fire weapons) only slowed the game down by a factor of 2.5 or so. (Not sure how much of the overhead was ships per se rather than, say, multiple citadels in the same system fighting each other.)
  • Missiles seem to be particularly expensive; the missile destroyers were ~2x as slow as direct fire destroyers.
  • It's plausible that strike craft also are computationally expensive, but this needs more testing.
  • All this suggests that the most computationally efficient late-game fleet would be artillery battleships. These would perform well against the Unbidden, okay against the Prethoryn (lasers/plasma cannons don't quite have the range of kinetic artillery), and would probably struggle against the Contingency and especially Centana, both of whom pack lots of energy torpedos.
 
  • 2Like
  • 2
Reactions:
Okay, a bit more testing (just using a stopwatch, since I've still not quite spent the time to figure out how to interpret the numbers from debug_stats). Basically I just moved all my battleships (630) to one system, all my destroyers (2380) to another, entered "attackallfleets" and then timed how long it took for the game to advance by a day. I wanted to test the effect of missiles on the game performance, so I did one test with missile destroyers and one test where I replaced the missiles with direct fire weapons (plasma cannons, as I think I did all the refits just as the prethoryn were coming...).

I wasn't super careful with the math, so this is just a rough average over several days:

Baseline (no combat): ~0.9 sec/day
No destroyers: ~6 sec/day
Plasma artillery destroyers: ~15 sec/day
Missile destroyers: 20-30 sec/day.

All of the combat tests had FAE/carrier/WW battleships also duking it out. (And also lots of citadels/starbases/defense platforms.) I probably should rerun these and be more careful recording the numbers, and if I do I'll update this post. But a few things seem pretty clear:
  • More ships means the game runs slower, but it's not necessarily a linear relationship. Adding the destroyers increased the number of ships by a factor of 5, but (at least with direct fire weapons) only slowed the game down by a factor of 2.5 or so. (Not sure how much of the overhead was ships per se rather than, say, multiple citadels in the same system fighting each other.)
  • Missiles seem to be particularly expensive; the missile destroyers were ~2x as slow as direct fire destroyers.
  • It's plausible that strike craft also are computationally expensive, but this needs more testing.
  • All this suggests that the most computationally efficient late-game fleet would be artillery battleships. These would perform well against the Unbidden, okay against the Prethoryn (lasers/plasma cannons don't quite have the range of kinetic artillery), and would probably struggle against the Contingency and especially Centana, both of whom pack lots of energy torpedos.
Did you ever find a fix for this? I am also running into this same issue in the midgame with battleship fleets w/ hangers. Each day is taking 20+ seconds. Has the Beta's helped with this at all? Would suck to have to make all my ships artillery battleships towards mid-late game.
 
  • 1
Reactions: