Save file policy

There are often posts here about unfortunate people who have lost hours of work, usually by some kind of file save failure. Experienced people know how to overcome that but even they sometimes make a mistake. I mean, we’re all human, right?

In the Mac world, software like Pages and Numbers introduced a policy of continuous saving a while back. The old system required you to save positively and to keep saving every so often to ensure files are updated. That is the system SU uses. Files that save all changes on the fly do take some getting used to and not everyone likes it, but it would get around many file save failures. Is there a reason software like SU could not adopt such a system if it so chose?

I absolutely HATE autosaving. I have gotten used to it in some contexts (such as Google Docs, partly because the browser-based environment is inherently less reliable, unfortunately), but locally on my computer I do not like it at all. The reason I don’t like it is because I often do little “experiments” to make temporary changes to a file. I don’t want those changes to accidentally become permanent. I completely realize that after I delete or undo those experimental changes, the state of the content is back to normal and an auto-save will be happy. Nevertheless, I do not want the software to dictate when to save. I also don’t like the churn of the computer’s file storage system when writing unwanted copies of files (especially for Flash-based storage, which supports a finite number of write operations before the media fails).

Regarding SketchUp specifically, a complication is that SketchUp by default performs a validity check on the contents of the model while doing a save (which is quite time-consuming on a model with 100K or more edges and faces). I really REALLY do not want that to occur spontaneously or “randomly.” I realize this check can be disabled, but I leave it enabled because I figure it should be run eventually, and might as well run it when I am prepared for it (which is when I request an explicit Save).

I suppose that is what a Mac is doing but it seems to work differently from, say, the autosave feature in other software that doesn’t do it on the fly but only at set intervals. That can certainly be annoying.

The worst feature of the Mac way is that if you download something that you plan to use as a template for something new, you do have to remember to hit Duplicate, otherwise you will be altering the template document.

I can see a validity check would slow things down hugely but I wonder if SU has to do that rather than at other times (eg at set times as for autosave or when you manually save)?

I am musing really, and I know that PC users really dislike Mac ways for their idiosyncrasy. But at its best, it can be a way of shaking people out of their complacency, no?

I’ve been primarily a Mac user since about 1990. I agree that unintended edits to original files is one of the aspects of autosave and continuous-save that I dislike. For example, recent versions of Preview on the Mac make it super easy to inadvertently add an annotation (when clicking to try selecting some text), which then gets saved out! Grrr. Thankfully when quitting Preview it often asks whether I want to revert the (unintended) change.

Also just musing, as I don’t have access to implementation details.

Why is it that those other apps can do continuous saves without performance hits that are noticeable to the user? It seems like they must be saving some sort of incremental change log and that the amount of change from any one document transaction must be limited so that the save can be fast. What would be the minimum transaction that SketchUp could save? Because each added entity can interact with everything in the active edit context, potentially a lot of changes could be wrapped up in a single “transaction”. For example, think about Intersect Faces with… or the Solid Tools. Extensions are essentially unlimited in how much complexity they could wrap into a single invocation. So, whereas I don’t know it isn’t possible, I worry that a continuous save would have disastrous and constant performance effects.

The $64,000 question.

I presume that just as your computer has to register and execute a command, such as drawing a line of n length, the code that does that could be written to the saved file at the same time and just as quickly as the temporary file that is held in short term memory while you work on it. Or something like that. I’m guessing really.

From what @TDahl has said, when you do a manual save or an autosave, the computer has to gird its loins, rouse itself from slumber, get the mighty wheels in motion, etc, and that all means a performance hit. You couldn’t have that at every stroke of the keyboard but you might be able to have a much more basic write exercise perhaps?

The software’s algorithms and data structures would need to be designed to allow efficient incremental save (I claim, speaking as a long-time professional software developer). Re-writing the entire file is not viable, even ignoring other factors (such as SketchUp’s validity check, which dominates the storage-device Input/Output time for models with a lot of geometry). As @slbaumgartner notes, the changes caused by a single user operation can be quite varied. Consider drawing “just one” new edge that crosses a series of existing edges; they all have to be split, new faces created, etc. In my mind this is closely related to the “undo” machinery in the code. Each undo-able action would be a good candidate for an incremental save (not that I want the SketchUp team to consider adding continuous save).