3 ms·
For an application working with reasonably sized files sqlite files it would be reasonable to 1. on opening a file clone it to a temporary folder 2. edit the
by afiori 3y ago
For an application working with reasonably sized files sqlite files it would be reasonable to
1. on opening a file clone it to a temporary folder
2. edit the temporary file there on disk
3. on save mv/cp the temporary file over the destination
I am probably missing a lot of use cases, but it migth be a good idea for a game like Factorio where you are expected to have multiple on disk saves of the same run at different times.
- fluidcruft 3y agoIn the sqlite case, I think it actually can save uncommited edits to a separate journal file until committed. At least, one of the systems I am familiar with that uses sqlite as a container format (MRI scanner) seems to do this, so I suspect sqlite supports that mode natively. I'm just pushing back against the idea that its a good or helpful idea to "help the users" by taking the deliberate "save" action away from them. As an aside, one of the things that has been learned from this class of MRI scanners is that users need to feel "in control" of the machines they're using. The "look how smart this machine is by doing all these magical things you used to do yourself!" attitude works well in sales but really does not go over well in the field because users encounter the fuckups and are held responsible for them. So they quickly start to distrust the machines.