End turn button not working

Problems and solutions for installing or running FreeOrion, including discussion of bugs if needed before posting a bug report on GitHub. For problems building from source, post in Compile.

Moderator: Oberlus

Message
Author
User avatar
Oberlus
Cosmic Dragon
Posts: 5714
Joined: Mon Apr 10, 2017 4:25 pm

Re: End turn button not working

#16 Post by Oberlus »

Problem with the slow turn might be RAM issues related to the serialization of the game for the save file. Try, if you haven't, disabling the auto-save (all of them) to get to the final turn in one row. That might help if the problem is only due to huge save file.

However, the game keeps all past data, even the dead stuff of the defeated empires (you can query the objects window for dead/destroyed stuff). So each turn you advance the game the total memory usage keeps growing. At some point, it might reach the point in which the whole game state does not fit into RAM and you start using HD swapping for turn processing. Only getting more RAM or playing smaller games (less enemies but particularly less systems) could solve that.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: End turn button not working

#17 Post by Geoff the Medio »

Oberlus wrote: Fri Jun 12, 2020 5:49 pmAt some point, it might reach the point in which the whole game state does not fit into RAM and you start using HD swapping for turn processing. Only getting more RAM or playing smaller games (less enemies but particularly less systems) could solve that.
It's very unlikely that the FreeOrion gamestate will grow so big as to use up all the RAM of any reasonably modern system with any reasonable size galaxy. The issue with saving and serialization is rather that the text representation is much bigger than the actual in-memory data of the gamestate, and it needs to be in a contiguous block of memory. Also, separate from the memory requirements, the process of doing the serialization to and from text is itself somewhat slow

Instead of disabling autosaves, one can also switch to binary saves, which take much less memory to read and parse or write, since they can be streamed into memory or to disk directly, instead of needing to be fully loaded as text in a single buffer during the serialization process, and since the binary representation is a lot faster to generate than the text equivalent.

Post Reply