

- #Increase frequency of autosave in word for mac full
- #Increase frequency of autosave in word for mac windows
This would require that the point where you trigger the save is very controlled (no other threads actively running or holding locks, for a start), and it's going to have an impact on the performance and memory usage of the game during the save since every page it writes to will have to first trigger a page allocation and copy. On Linux you can in principle just fork() at the point the save occurs, and have the child process do the actual saving while the main process immediately carries on playing the game - letting the kernel deal with doing the copy-on-write work to duplicate the state where necessary. At that point the compress-and-write process can asynchronously complete.įrom your quickie-benchmark, it would appear that such a process could nearly double the speed of game-saving. If the above is a "yes" (which I would expect it should be), would it work to increase the number of buffers - like, by a lot? If the system in question has enough memory (Both my desktop and laptop I play Factorio on are 16GB, and that's not too unusual), I can't see a reason not to allocate enough buffers to allow the game-state-copy process to run unblocked. Can the game resume while buffers are still in the compressing & writing stage? (but the filling process has completed).Ģ. Your outlined process does give me an interesting thought though:ġ. This does have the down-side of doubling the memory requirement of the game, as well as potentially taking a non-trivial amount of time, especially if you have memory fragmentation issues and can't just copy a huge contiguous block.

That is, you quickly blit an image of the entire game-state, then use that as a reference for doing a proper serialization procedure.
#Increase frequency of autosave in word for mac full
My understanding of the suggestion was to prepend a full imaging process onto the existing system. We can't just "clone" the main programs memory and write that to disk because the vast majority of it is not something that should be saved else your save file would end up roughly the same size as the RAM it takes to run. The game state is scattered across memory and in random order compared to what ends up getting saved which means a ton of random access and it ends up waiting on RAM. The time difference being measured by commenting out the compressing and writing to disk portion and seeing how long it takes to do the main copy-game-state-to-buffer.
#Increase frequency of autosave in word for mac windows
Any machine with 8Gb or more of memory should be able to handle this, Windows is remarkably good at managing memory, better than some people give it credit for.Ģ0 x 1 MB buffers are allocated and then the save file is serialized into a buffer 1 at a time until it's full. Once the copy was done, the convert and write to disk could be done lazily in another thread. ~3.0Gb Virtual), and the Working Set would almost certainly spike, although most likely not by as much.

Sure, while that second buffer was present the game's memory footprint could get as large as doubling (i.e. That's something that the Devs would need to profile before even thinking about doing this.

If the working state can be cloned to a buffer in a relatively short length of time, then this would be worth doing. convert it to a writeable format and / to actually write it to disk. Making a clone would only make sense if the bulk of the time required for the pause is currently needed to "serialize" the data, i.e. So that means that most of the game is already in chip memory, as opposed to being paged out to the swap file. This would allow the game to resume fairly quickly, but it can be a huge surge of extra RAM and baby systems might not like that.įactorio running on my system right now is ~1.5 Gb Virtual, ~1.3 Gb Working Set. If you don't mind blowing a little extra RAM, the game state can be cloned and split off to a separate task. That means being paused while the data is captured. The latter two tasks can happen on their own, but the first task HAS to be done with the game in a synchronized state. The entire game state has to be captured at once, processed into a saveable format, and then written to disk. That's in my eyes the way to go and the devs also want it to go. Making autosave unremarkable into background is per sure a wish of all devs, especially Kovarex.
