Async *is* the solution to saving stalls, the reason why unix fork() was implemented here is that it is stupidly simple...it's a single syscall followed by an if-else statement that checks parent/child status.bman212121 wrote: ↑Fri Apr 26, 2024 1:58 pm Async saving is one of those oddball things that seems like it's a workaround to a bigger problem. If saves were barely noticeable then why even bother to put the effort in for a feature that 1% of 1% of the userbase uses? Why not work towards a solution that helps all users?
<snip>
The issue is how do you get the entire game state, freeze it, copy it, and then unfreeze the main game, very fast, it's a lot more complicated when you don't have OS level access to the entire memory space. most database engines are built from the ground up, with the this in mind, they're designed to do sharding across multiple machines and be consistent, they also require careful design and expertise, file systems also have similar requirements. Note there is one such, free piece of software that might achieve this, called lmdb, it's stupidly fast and ACID compliant, but it would require a large part of factorio to be rewritten to use it.