• 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.
No. The player doesn't assign the AI's pops. The AI does. Through evaluation.

But his idea has some merit. What if the player would provide general guidelines and policies, that would short circuit the algorithm and make pop assignment a breeze computation wise?
E.g. Penthulans always clerks, Motabytes always miners...
With a consistent and complete set of such hints the game would be much faster.
 
But his idea has some merit. What if the player would provide general guidelines and policies, that would short circuit the algorithm and make pop assignment a breeze computation wise?
E.g. Penthulans always clerks, Motabytes always miners...
With a consistent and complete set of such hints the game would be much faster.

See my edit. There's little performance gain to be had here. It's not a fix.
 
Did very quick test on that old 2.3 saved file. In "normal" mode it didn't seem all that different to me in terms of performance but when I turned ticks_per_turn to 20 it went about 4x faster instead of 2x faster! However, I had some problems with the graphics on my MacBook so not quite the same settings I was using before.

CPU usage seems about the same.

Going to try a real world test on a new game...
 
Look, just get rid of everything you can that's causing a problem: Pops, jobs, trade, etc.

Have resources come from the buildings and districts themselves, like how the Nanite Transmuter works, or get rid of buildings and districts as well and have everything produced by the planets directly.

Then make the updates happen once a month rather than every day. After that, it's just a matter of coming up with something new for unemployment, and something like having Growth Speed contribute to the speed at which a planet unlocks building slots and/or gets up to max resource output.

Edit: Also resource production traits (Which could become scaling empire-wide benefits), and things like Mining Guilds, which can just affect the buildings/planets instead of jobs.
 
Wanted to quickly report in.

Having only recently been digging into performance issues regarding Stellaris (I only recently got the game) after noticing the increasingly slowdown in my first game, I am pleased to report that performance has noticeably increased, at least on my end. Really quite appreciate it
 
As you said it was a video and it's very difficult to describe everything accurately in precise terms while in front of the camera.

It was answering to a question on script perf hit in front of a crowd of gamers, took 30 seconds tops, and basically explaining what @permeakra said.

Yes, rendering is quite costly, but TPT 10 largely eliminate the rendering overhead. The game runs few times faster, but the pop-dependent part of slow down is still there. The stats I have posted earlier are from TPT 10 run.

I never implied there was a relation between the two. I pointed out rendering as an additionnal problem.
 
Yes you can. This just means that you don't work with a programming language, but a sort of data definition/markup language.
Stellaris 'scripts' are not interpreted in the same vein as, say, python or lua scripts are. The game code has a lot of predefined 'slots', and the 'scripts' merely describe values to be put into those slots. With proper interpreters it is vice versa: the host program exposes its objects into a proper general-purpose interpreter. Granted, the Stellars 'slots' allow for some variance and this cannot be good for performance, but approaching this part of performance issues from the same side as optimizing interpreters clearly is counterproductive. Performance won't benefit from exposing more, it would benefit from exposing less and in a more rigid form.
Have you actually looked at PDX scripts? They aren't configuration files you are thinking about. They have arbitrary length of nesting conditions, logic operations on variable length sequences of operands etc... To run that you need a typical interpreter code that looks like:
Code:
if (operation = AND)
  do something
else if (operation = OR)
 do something
else if (operation = IF)
 do something
and so on... It can be formulated in various ways, but the end result is the same - a simple logical condition which, if compiled, would be ~10 instructions becomes 10 times larger - thus stalls.
 
Have you actually looked at PDX scripts?
Yes I did. They basically fit the structure I described. They ARE neendlessly flexible, with all problems this implies. They are not, however, anything even remotely resembling a general-purpose programming language, and moving in that direction would be counterproductive.
To run that you need a typical interpreter code that looks like:
1. No you don't. Stellaris conditions can be transformed into boolean expressions over boolean-valued conditions. Boolean expressions can be transformed into a normal form. Calculating normal form with variables known can be implemented using cycles only, without if-then-else's .
2. No, typical interpreter code doesn't look like this. This particular part is usually implemented using 'switch' or equivalent which usually compiles into indirect jump.
 
Last edited:
Performance much worse then before. Took me 3 hours to get to 2230 on 3x speed and 200star galaxy, and its slowing down more each day. Wish I was joking

I've got a monster MP game going on at the moment that's way in the lategame, and performance seemed... similar? Maybe a bit faster?

Some stuff definitely got fixed though, all the slaves on planets I'd conquered all got set free simultaneously and unemployment ballooned. :)
 
I've got a monster MP game going on at the moment that's way in the lategame, and performance seemed... similar? Maybe a bit faster?

Some stuff definitely got fixed though, all the slaves on planets I'd conquered all got set free simultaneously and unemployment ballooned. :)


Figured it out, somehow with new Laucher every mod I was ever subscribed to is actually enabled, even if Launcher toggle for it was off. Even after unsubbing from mods in steam, and wiping out checking that their mod files are gone, they were still active. So I had starlet, edai, glavius, and everything else active without knowing it, no wonder performance sucked

Only deleting Documents/Paradox folder have fixed it.

Performance now back to around 2.3 level
 
If inactive mods are still active, this would be rather bad. If unsubscribed mods are active, that's a disaster.
Maybe the new installer doesn't use the settings.txt file to set the active mods like v2.3 and maybe it uses another dir or file.
Some communication would be nice around the whole process of mod activation.
 
Figured it out, somehow with new Laucher every mod I was ever subscribed to is actually enabled, even if Launcher toggle for it was off. Even after unsubbing from mods in steam, and wiping out checking that their mod files are gone, they were still active. So I had starlet, edai, glavius, and everything else active without knowing it, no wonder performance sucked

Only deleting Documents/Paradox folder have fixed it.

Performance now back to around 2.3 level

Wait, can you explain that again? I saw the "ENABLED" button switched to green. My "Stellaris" run that worked perfectly in V2.3.3 commits suicide in V2.4 and up. What exactly did you do?
 
If inactive mods are still active, this would be rather bad. If unsubscribed mods are active, that's a disaster. Maybe the new installer doesn't use the settings.txt file to set the active mods like v2.3 and maybe it uses another dir or file. Some communication would be nice around the whole process of Mod activation.

"Stellaris" V2.4 uses a text file called "DLC_LOAD.JSON". It opens in Notepad and works the same way as Stettings, except that the list of Mods go between square brackets and must be separated by commas.
 
I am yet to be convinced the issue is the volume of processing required, and not unnecessary calls to reoptimise the same jobs and the same pops again and again.

As I understand it .... each pop has a preference for the stratum it wants to work in (rights), and a weight to measure how good it is at certain jobs (traits). All other factors (tech, policy, empire ethics, etc) affect all pops in an empire or on a planet equally and shouldnt influence relative job weights.

The only time jobs should be reoptimised is when a new pop arrives on a planet, or the species design or rights are changed. This doesnt happen multiple times per month.

What am I missing here?
 
Last edited: