Page 1 of 1

Quick save freezes the game

Posted: Sun Sep 06, 2020 11:44 pm
by cimpleman
Whenever I quick-save the game, it freezes for 5-10 seconds.

Maybe I'm incorrect, but I would guess that quick saving is implemented in a synchronous fashion. If it is, then I think it definitely should be changed to be asynchronous. Regardless, quick saving makes the game hang, which makes for a bad user experience

Re: Quick save freezes the game

Posted: Mon Sep 07, 2020 12:31 pm
by ttant
Hang might also be due to hardware issue, like economy mode which stop HDD if not in use (Time taken by windows to wake up the hdd then write on it might produces lag in game if everything is not in memory).
You're right about the fact that async will not hang the game, but it might create other issues as the game has to take a snapshot of all variables at a single time to avoid corruption.
I mean if you start to take a quick save when a NPC state or location changes, there might be consequences (ie: Frank was not near you at first but is at end : if you drink booze, he can caught you.

Re: Quick save freezes the game

Posted: Tue Sep 08, 2020 10:51 pm
by cimpleman
Maybe it would work if the game just makes a copy in memory on the main thread, and then saves it to disc on a separate thread while the game continues afterwards?

Re: Quick save freezes the game

Posted: Sun Sep 13, 2020 10:57 am
by eekdon
So replicate the quick/autosave functionality seen in many other single player games? Oh man IDK if the technology is there yet ;)

I've got this in a ticket, we'll look into it.