I would have thought all files of all apps would commonly be almost the same as the in-memory copy but that is naive I’m sure, essentially a loop that de-fragments the heap into a contiguous binary and back. Probably not memory safe. With pointers locating things that break with version changes.
Perhaps instead it serialises all of the heap objects and does that header coding labelling each chunk of data as string, blocks of unit8, blocks of audio, image etc. And the reverse for bringing from disk.
But I’m convinced I’ve found a bug with the LibreOffice Writer auto-save / save function. I should file this as a feature/request / bug official.
Feature/Bug: LibreOffice Autosave Performance Optimisation Bug
I’m working on a book, an encyclopaedia actually, that is 71,000 words and 433 pages. Just now it took 29 seconds to save on very beefy 32GB Ryzen workstation @4.2Ghz
So I have changed to never saving the file. By letting autosave do it’s thing I can keep working on the book. I now have a requirement for a performance optimization that is a) possible, b) kinda obvious it isn’t the way it’s done.
The optimisation checks if you have not touched the keyboard, nor clicked or changed anything in the file since the last autosave; that it would rename/copy the autosave file into the main file instantly instead.
Luckily, LibreOffice seems extremely stable and i have backups if the file goes corrupt but it is a little nerve-wracking as sometimes I have to reboot quickly and no i do not get to do manual save and yes the autosave ALWAYS has my back so far but it is freaking sometimes when that happens during fast reboot, system freeze or power cut.
I have my autosave freq at 1 minute instead of 10 mins default.
This would enable me to hit save as frequently as I have trained myself to do. I just noticed a feature I haven’t tried: “Automatically save the document too” maybe this does what I’m talking about, oops I think this will do. It’s nice to have the right to hit Save though.