With larger a game setups and/or advanced turn number performance is going down.
That is nothing new and was mentioned several times.
Especially navigation in the GalaxyMap becomes real slow.
I took some time to search for possible reasons and remedies.
The more objects in a game the more macros have to be executed and if a macro doesn't use a proper filter it needlessly consumes ressources.
So my prime objective was to locate and remove such performance leaks.
I found possible leaks in the location tags for buildings and shipHulls.
I have no idea how to measure if there really is a performance boost, but it feels faster.
Especially in production menu switching from one SidePanel planet to another in the same system is boosted.
Netherthless, don't expect this to work miracles.
I wanted to test this longer, but realising a new test revision was already released i thought i'd better share my results already.
The package supplied is experimental, so make sure you have backups of the files before you replace something.
Mostly i worked over the location tags, but there's also a few other things included.
The file attached contains modified versions of buildings.txt and ship_hulls.txt as of Rev. 6104.
More documentation inside the files themselves.
Experimental performance pack Rev6104
Moderators: Oberlus, Committer
Experimental performance pack Rev6104
The beauty of travel is visiting foreign countries and meeting new people.
G.Khan
_______________________________________________________________________
All code provided is released under the CC-BY-SA 3.0 and GPL 2.0 or later licenses
G.Khan
_______________________________________________________________________
All code provided is released under the CC-BY-SA 3.0 and GPL 2.0 or later licenses
Re: Experimental performance pack Rev6104
ok well I just installed unrar so that I could look at this, but if you want more folks to look at it I recommend simply attaching such short text files as-is, or using zip.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13587
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: Experimental performance pack Rev6104
When submitting code or content files, please use four spaces instead of tabs.
You did change a few things that might affect in-game behaviour, such as not requiring a planet's shipyard to be owned by the empire trying to produce a drydock there (and similar cases for other buildings and hulls).
Adding Planet tests to the start of location conditions for buildings or hulls probably doesn't help much, since those tests are only applied to single planets anyway, when deciding if a ship or building can be produced at that planet, I think.
The other location condition reorderings are probably OK.
You did change a few things that might affect in-game behaviour, such as not requiring a planet's shipyard to be owned by the empire trying to produce a drydock there (and similar cases for other buildings and hulls).
Adding Planet tests to the start of location conditions for buildings or hulls probably doesn't help much, since those tests are only applied to single planets anyway, when deciding if a ship or building can be produced at that planet, I think.
The other location condition reorderings are probably OK.
Re: Experimental performance pack Rev6104
Well, i was not sure about the planet thing but i saw it in some other macros.
If location could be any object in game i thought it's best to reduce the choice to planets first, thus eliminating ships, fleets, buildings, etc.
As for some ship(yard) prerequisits, if it can only be built at a planet 'owned by the empire' with certain buildings,
these buildings are 'owned by the empire' anyway, or is there a possibility for one empire to have a shipyard on another empires planet?
So far i thought ownership of all buildings on a planet is derived from the ownership of the planet itself?
I'm not as far into the game and coding as you are, only did some trial and error tests, but scored some result.
As for the tabs, that should not be a problem, you can use sed to change them.
This command changes all tabs in file1.txt into 4 spaces and writes the result to file2.txt :
This should work for a unix/linux sed as well as for the windows one that can be found at http://unxutils.sourceforge.net/ .
Of course i'll do that for future code as well before submitting.
If location could be any object in game i thought it's best to reduce the choice to planets first, thus eliminating ships, fleets, buildings, etc.
As for some ship(yard) prerequisits, if it can only be built at a planet 'owned by the empire' with certain buildings,
these buildings are 'owned by the empire' anyway, or is there a possibility for one empire to have a shipyard on another empires planet?
So far i thought ownership of all buildings on a planet is derived from the ownership of the planet itself?
I'm not as far into the game and coding as you are, only did some trial and error tests, but scored some result.
As for the tabs, that should not be a problem, you can use sed to change them.
This command changes all tabs in file1.txt into 4 spaces and writes the result to file2.txt :
Code: Select all
sed "s/\t/ /g;" file1.txt>file2.txt
Of course i'll do that for future code as well before submitting.
The beauty of travel is visiting foreign countries and meeting new people.
G.Khan
_______________________________________________________________________
All code provided is released under the CC-BY-SA 3.0 and GPL 2.0 or later licenses
G.Khan
_______________________________________________________________________
All code provided is released under the CC-BY-SA 3.0 and GPL 2.0 or later licenses
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13587
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: Experimental performance pack Rev6104
The location conditions for buildings or ship parts are generally used to test whether a single particular object is an acceptable location, not to test all possible objects. In practice, it's generally only necessary to test planets, so an extra test to check if an object is a planet should be redundant.Cluesen wrote:If location could be any object in game i thought it's best to reduce the choice to planets first, thus eliminating ships, fleets, buildings, etc.
Effects could be set up to make this happen, and possibly other game mechanics. It's not a normal occurence, though....is there a possibility for one empire to have a shipyard on another empires planet?
No; each object is independently owned by a single empire or no empire.So far i thought ownership of all buildings on a planet is derived from the ownership of the planet itself?
Re: Experimental performance pack Rev6104
Here's a converted version without tabs in zip format:
The beauty of travel is visiting foreign countries and meeting new people.
G.Khan
_______________________________________________________________________
All code provided is released under the CC-BY-SA 3.0 and GPL 2.0 or later licenses
G.Khan
_______________________________________________________________________
All code provided is released under the CC-BY-SA 3.0 and GPL 2.0 or later licenses
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13587
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: Experimental performance pack Rev6104
That's better, but the other issues remain.Cluesen wrote:Here's a converted version...
If you could do some timing tests to demonstrate that the Planet location condition additions are actually beneficial, that would motivate including them. There is a verbose logging option in the UI tab that should increase the amount of detail in the logs, including timing information for various things the game does. Looking for ProductionQueue::Update time log entries might be useful. Likely a full queue of buildings and/or ship designs would be good to test for the location conditions.