I've harped on this before, but now I've thought it through and I have a way to do it.
The problem: Big files take a long time to do timed auto-saves (I'm not referring to manual saves).
On my PC my biggest file (35mb) takes about 2 full minutes to auto save every 1/2 hour.
75% of my files are over 10mb, of those 1/2 are over 20mb.
I fully realize the save time is largely controlled by the individual h/w in the O/S file support system, but SU is frozen during the save. Either of my 2 suggestions will either eliminate the freeze or bring it down to a very few seconds with even the largest files.
There are 2 solutions for SU-9.
-
Make use of PC's with dual/quad core to do the auto save (and the manual save) on the 2nd core in true background.
This should be relatively easy to implement, requiring a sub-program running independently in background in core 2 monitoring the memory area of SU running in core 1. Auto saves would occur as now, on a user defined timed basis. This interval can now be just a few minutes between.
This should eliminate any SU freeze time during a save.
-
Save ONLY the "UNDO" stack periodically till a manual save resets it. Here's how.
Keep in mind, the undo stack is actually a chronological list of all model changing operations.
The undo command simply reverses the changes back down to a previous state. So if you take a copy of the file from the initial load (or last save) and then apply the undo stack to it, or a "redo", you should end up with the same version as if no undo's were done.
The auto save remains event conditional on 3 points.
a) the user defined auto save interval is reached. (in my case, 30 minutes)
b) the undo stack runs to 100 (or whatever) operations. (SU6 is 100 steps, I've counted)
c) the undo stack exceeds a defined size. (a few mb)
The undo stack is still preserved in SU, but is modified with a pointer to keep tabs on where in the stack it last auto-saved to avoid double counting.
When SU first loads a model file, it creates an empty auto-save file on HD, in background.
When an auto-save is triggered (a,b or c) the undo stack is written out to disk, appended to the previous (this session only) auto-save file. This is very fast as the undo stack is relatively very small.
When a manual save is triggered, the save file is written out to a new file, and if the save is successful, the old file is deleted and the auto-save stack is zeroed out.
To recover a file (upto the last auto-save point) is simple.
Su loads the last saved file, then applies the saved undo stack (chronologically) to it, in effect a total "redo".
As is the case today, the recreated file is only as up to date as the last save or auto-save.
This way you can reduce the auto-save interval dramatically to a few minutes, preserving a greater amount of work in case of some crash or other event.
An alternate (optional) use of saving the undo stack is to preserve the detailed work history of the model over several versions, for audit use, training or documenting bugs. In this case, the undo stack file is preserved along with its base saved file, to be played back at some later date.