paulwheeler wrote:I honestly do not believe that reducing the number of ai ships would make any difference. Most trading scripts and especially the civilian scripts are extremely simply. The civs run a script that just makes them fly from station to station. Its just a couple of lines. Removing them will make little difference and will spoil the immersion factor.
In any case, I think Yarrick5's issue is not anything to do with the xrm. It sounds more like a complex script that's stuck in a loop with a wait command, so its not completely hanging, but stuttering. I suspect only a game restart will fix things.
The test is start a new game - is the problem still there? If not, then the problem is likely script related as they often manifest over time. Issues with mods are generally there from the start.
These "Simple scripts" use some of the most performance intensive commands in the entire game, most notably the "find" commands. These commands are not cheep because in order to find something you need to search for it, the game does this by looping though arrays and tables of data in order to find the best match, sometimes - this is (relatively) instant, but most of the time it takes linear time to complete. The more tasks in the game executing code that has linear requirements, the more performance they take up.
When it comes down to it, the MD and SE are virtually executed languages, who's implementation resides in a virtual machine, whom is executed in C++. So there three layers going on here.
A simple instruction in the SE, say, $i = 1, is far more intensive then it seems.
in order to push 1 to $i, first - it has to process the intent, in this case the intent is clear due to the operator "=", but the problem is there is no simple "set" command within the SE, at least not in the straight forward sense, it has to look-up what operation "=" represents, grab the value 1 from an array, and then assign 1 to the array index that holds $i, all this happens in the virtual environment.
But it doesn't end there, each instruction in the virtual machine has to be processed on the C++ level in a similar manner - the virtual machine is stack based so it can issue the command
ADD Idx1, Idx2
but on the C++ it has to translate that command into something that an x86 processor can understand, so that's another level of translation on top of the SE translation that's already been performed. And because a good 90% of the game resides in the virtual machine (including previously mentioned find commands), this is why many ships in the game has a compounding and non linear performance hit as the number gets higher. The job & god engines only serve to make things worse because they are active engines that do things in real time.
All in all, Performance in X is not something that's straight forward or simple. Unoptimized SE code is very bad for the game if allot of entity are running that code and small seemingly innocent changes have massive unforeseen effects, and the vast differences in hardware only make the problem worse.
And all of this is Before adding graphical rendering on top. The calculations it has to do on every single particle the game spawns is rather crazy, Additive blending makes that problem worse when not using grey/black colours.