[Suggestion] Speed up the save process
Posted: Wed May 21, 2014 1:30 pm
So, I don't know if this is a bug or, as I suppose, desired/expected behaviour, but Prison Architect freezes whenever I save the game. Since Autosave is enabled by standard, this occurs rather regularly, and lasts about 1,2 seconds, although this tends to become longer and longer with bigger maps and additional prisoners.
When I talked about this with a fellow CS student of mine, he suggested writing the save file to RAM first, then writing to disk. This way, the disk write time (which is still a major factor with the unfortunate of us that still have a HDD instead of a SSD) and spinup will not affect the game performance and the players won't even realize the game was saved (since writing to ram is incredibly fast).
The implementation of this would be pretty easy, I would suggest the method collecting the savegame information writing the info to a String, and after being done, invoking a method that writes the string to the disk while also releasing the game action, but I suppose the devs can come up with a simple, elegant solution.
And for those concerned with RAM usage, the .prison and .png files together are even on big maps rarely over 15 MB.
When I talked about this with a fellow CS student of mine, he suggested writing the save file to RAM first, then writing to disk. This way, the disk write time (which is still a major factor with the unfortunate of us that still have a HDD instead of a SSD) and spinup will not affect the game performance and the players won't even realize the game was saved (since writing to ram is incredibly fast).
The implementation of this would be pretty easy, I would suggest the method collecting the savegame information writing the info to a String, and after being done, invoking a method that writes the string to the disk while also releasing the game action, but I suppose the devs can come up with a simple, elegant solution.
And for those concerned with RAM usage, the .prison and .png files together are even on big maps rarely over 15 MB.