Page 2 of 2

Re: Auto-save causes lags

Posted: 18 Apr 2015 21:14
by xxJamesxx
mity wrote:Tried to reproduce in brand new profile without any mod, but it did not happen. The question is whether it happened in the main profile due mods (ProMods), or due complexity of the profile (e.g. a lot of owned garages and trucks). I simply can't see why Mod which just expands map should have an impact on save time. Especially when I consider that radmik sees with no mods. His video is very similar to what I see but my lags are even longer.

The auto-save problem has been an issue since the games first release and still is an issue as I get the same thing on occasion. The game runs beautifully yet when it auto-saves it just freezes/massively lags for a second or two then starts going again.

This is from back in Nov 2013
Serge SB wrote:
It became clear, that the stutter delay is connected with profile activity. Tester's profile was almost empty (just a few percent of opened map, no truck, no drivers, game.sii file size is about 130kb). My main profile is almost full (about 90% of map discovered, all 153 drivers hired, about 70 garages owned, game.sii size is 1.3Mb).

Then I tried to do a little old trick. I thought, that if the autosave file could not be created, then the game won't stutter. So I removed the 'autosave_drive' folder and created the file with the same name. Now no one could create this folder. But it hadn't helped. This is a piece of a log from that session:

01:02:10.784 : Creating save-game file (/home/profiles/4D2E442E/save/autosave_drive/game.sii) ...
01:02:12.423 : <ERROR> [fs] Failed to open file "/home/profiles/4D2E442E/save/autosave_drive/info.sii~" in the create_truncate mode
01:02:12.423 : <ERROR> Unable to create '/home/profiles/4D2E442E/save/autosave_drive/info.sii~'
01:02:12.434 : Game has been auto-saved.

As you can see, the game is first saved into some sort of an in-memory object, and only then it actually goes to disk. The saving process took 1.6 seconds. You know, it's not quite comfortable to drive the road curve at 110km/h and have such a stutter. /very sad notice: I've almost got used to it:(/

I tried to increase the memory pool size to 700 (actually it lowered automatically to 684, as the log record stated). But this had not helped either.

As a software developer I could think about two solutions. First is quick and a bit 'dirty': add the option to disable autosaving while on the road (only those saves, that go to 'autosave_drive' folder). Other types of autosave could be left as is, as they do not affect the gameplay performance.

Second is to rewrite the autosave procedure. Well, sure, I'm no _SCS_ developer, but I would think about creating the snapshot for everything, that needs to be saved (I assume, that it could be done very quickly), and then launch the actual saving procedure in a separate thread. So the game engine could continue working.

Thanks for reading, hope to get a comment from SCS team.
viewtopic.php?f=8&t=6869&start=20

Hard to believe that this is still an issue after all this time. I have to admit I like the first suggestion of turning off auto-saving on the road and only saving when you actually pick up or hit the key to detach the trailer on delivery. This way the lag/freezes will not be such an issue as nothing is more fun that taking a turn in a road at 80kph and having the game decide it wants to save and freeze in the middle of the turn.

And if I remember reading right in some of these old posts about it that yes the more trucks and drivers you had the worse it was going to be as the file size being saved got bigger and bigger as you got more trucks,drivers and garages making the problem worse.

Re: Auto-save causes lags

Posted: 18 Apr 2015 21:19
by Unco
The strange thing, for me, is that the auto-save stutters disappeared in 1.16 64bit, but they are back in 1.17 (64bit). I own every garage in the map.

Re: Auto-save causes lags

Posted: 20 Apr 2015 12:32
by Max
its apparently different issue - look at the timings in log

old one from SergeSB:

Code: Select all

01:02:10.784 : Creating save-game file (/home/profiles/4D2E442E/save/autosave_drive/game.sii) ...
01:02:12.423 : <ERROR> [fs] Failed to open file "/home/profiles/4D2E442E/save/autosave_drive/info.sii~" in the create_truncate mode
01:02:12.423 : <ERROR> Unable to create '/home/profiles/4D2E442E/save/autosave_drive/info.sii~'
01:02:12.434 : Game has been auto-saved.
... where is 1.65sec delay visible.

new ones from radmik:

Code: Select all

00:22:36.461 : Creating save-game file (/home/profiles/526164656B/save/autosave_drive/game.sii) ...
00:22:36.469 : Game has been auto-saved.
00:37:07.576 : Creating save-game file (/home/profiles/526164656B/save/autosave/game.sii) ...
00:37:07.608 : Game has been auto-saved.
... where are 0.008 and 0.032 sec long saves.

i'll try to investigate what is happenning there now.

Re: Auto-save causes lags

Posted: 22 Apr 2015 16:16
by jasep
Hi,
I noticed the same auto-save lag issue, but it seems that the latest beta (1.17.0.26s) fixed this. At least its gone :)

Re: Auto-save causes lags

Posted: 22 Apr 2015 17:45
by jasep
BUT, also found that with latest MHAPro EU 1.9 or Rusmap the problem persists... Then again, the later one doesn't even claim to be 1.17 compatible.