Page 1 of 1

Saving games is very long now (v0.4.6)

Posted: Thu Sep 29, 2016 9:59 am
by OurSavior
Hi all,

I'm using FreeOrion 0.4.6 build 2016-09-16.49f9123 MSVC 2013 on windows 7 64bits. While I'm here, many thanks for your great work guys.

Saving games takes a huge time now, compared to 0.4.5 . What I mean is that after confirming save and being back to the game, one might think that save file has been created on disk already but in reality in won't be before 10 to 15 more seconds. I checked that by opening the load game window just after saving a game and trying to find the name of my saved game. If I leave the game before this file has been created on disk, then it won't be created at all and I'll lose my saved game. This happened to me before I understood what the problem was. Some users could lose their last saved game every time they leave the game and never realize what went wrong and how to solve it by waiting 15 seconds before leaving...

Re: Saving games is very long now (v0.4.6)

Posted: Thu Sep 29, 2016 10:05 am
by Geoff the Medio
In the Options "Other" tab, try turning on "Create Binary Save Files".

Re: Saving games is very long now (v0.4.6)

Posted: Thu Sep 29, 2016 10:22 am
by OurSavior
Thanks, it worked, although I had to restart the game for the option to be in effect after selecting it. Now saved game file is created instantaneously on disk and I checked I could load it immediately after with no problem. I am still worried for other users who might encounter the problem if this is a default setting.

Re: Saving games is very long now (v0.4.6)

Posted: Thu Sep 29, 2016 10:25 am
by Geoff the Medio
It's the default setting because the resulting files are smaller and portable across different operating systems. Saving as binary doesn't compress the data (which might be what's taking long for you... maybe post a log file of the server right after making a save that takes 15 seconds?), making the saves substantially larger on disk. Binary saves also may not load properly for someone who wants to debug your save on a different OS.

Re: Saving games is very long now (v0.4.6)

Posted: Thu Sep 29, 2016 10:57 am
by OurSavior
I suppose freeoriond.log is the server log (posted). It says it took 10.3 seconds which is what I measured approximately myself this time.

By the way, I just tried to activate the "detailed log info" option by curiosity but it makes the game hang when I try to load a saved game, so I did not activate it finally.

Re: Saving games is very long now (v0.4.6)

Posted: Thu Sep 29, 2016 12:36 pm
by Geoff the Medio
According to the log, it's spending most of the time saving just doing the serialization, or converting the gamestate info in memory into a format that can be written to disk.

Re: Saving games is very long now (v0.4.6)

Posted: Thu Sep 29, 2016 12:50 pm
by OurSavior
I forgot to add that I think I have a rather fast computer. My case is probably not especially bad compared to the average.

Re: Saving games is very long now (v0.4.6)

Posted: Wed Apr 19, 2017 1:44 pm
by rqn1234
I know this thread is a bit old but I am running into the same thing and gathered some data. Attached is the server log showing a game taking about 40 minutes to save. Once I followed the suggestion here to use the 'create binary save files' option that save time went down to under a minute for the same game at the same turn.

It is a pretty standard game. 150 stars, 14 computer opponents. I have a decent computer; Win 10 Pro 64-bit, AMD A8-3850 APU (quad core 2.9GHz), 16gb ram.

I initially had auto save on every turn and the game has always slowed down the further in I get processing turns, fairly normal. With 4.6 it seemed odd as usually right after loading a game it would process turns including that auto save quickly. When it would start to slow down a I tried saving the game, closing, restarting the game, and reloading. Once I did that it would be fast again for 5 to 10 turns. I was thinking maybe there was a memory leak somewhere in the end turn procedures but then I noticed it seemed to be hanging on the save game in the messages. I toggled the auto save to a 5 turn interval and noticed the delay only happened then on the turns with the auto save. That is when I came here and found this thread. Toggled the binary save option and am trying that this morning. First save literally took about a minute. I am going to play for a bit here and see how it goes.

Re: Saving games is very long now (v0.4.6)

Posted: Wed Apr 19, 2017 2:49 pm
by Oberlus
Hi,

That seems the same issue I had. It's been solved in FreeOrion 0.4.7 RC1 (Release Candidate, being tested). Download and install it, it won't delete your saved games and you can load them and continue playing. It's AI is also better, and you can try the new fighters (new ship parts: hangars and launchbays) that are cool.

Re: Saving games is very long now (v0.4.6)

Posted: Wed Apr 19, 2017 4:41 pm
by rqn1234
Oberlus wrote:Hi,

That seems the same issue I had. It's been solved in FreeOrion 0.4.7 RC1 (Release Candidate, being tested). Download and install it, it won't delete your saved games and you can load them and continue playing. It's AI is also better, and you can try the new fighters (new ship parts: hangars and launchbays) that are cool.
It is definitely working better now that I have the binary save option on.

I've downloaded the 0.4.7 RC1 files and I'll get that set up here soon. You had me at better AI but fighters on top of that is just all kinds of fun to play with.