Feature Request: Auto-save changes every X minutes

I use QuPath extensively to do WSI annotations for deep learning. Often, I am working on the same image for days and I just put my laptop into hibernate or leave it running while I’m doing chores or something (I’m working from home). Well, I have this stupid habit of not remembering to save my work before I get up from my desk. Since my corporate managed laptop insists on installing new Windows updates, I sometimes forget that there is an update looming and when I come back, I’ve lost hours or days worth of work due to a forced update.

I know it’s my own fault, but implementing an auto-save feature would tremendously reduce the amount of work I have to redo from time to time. I assume it would be a rather simple option to implement (maybe it could even be a script?), so I hope you will consider adding this feature to the next version.

Not sure how easily that would work for potentially multigigabyte data files or saving during a script, but since you brought up auto-saves, auto-saving scripts in case of a crash would be nice :slight_smile:

Currently if a script is running, that locks you out of interacting with the image - probably not what you want!

Oh dear… my guess is that it wouldn’t be that simple to implement. Some data files can get huge, and saving could cause significant delays. Trying to save in the background is complicated by the fact that the data would need to be locked while this is happening, and there’s no straightforward way to do that. The memory and processing costs could be ok most of the time… but cause trouble for some people at crucial moments.

I have considered saving annotations as a separate file in addition to the main data file (as a backup in case the data file gets corrupted) or attempting to support versioning of saved files. But neither is very easy or fast to include, and for now I don’t have the bandwidth to try them.

My approach is to regularly press Ctrl + S, and duplicate projects if I ever need them backed up.

My thinking is that it could be an option that has to be actively enabled and set to a specific interval in the settings menu. That way, users can decide if they would benefit from it or not and they can always switch back and forth as needed. I don’t know how locking is handled when saving manually, but maybe just have an overlay or popup message whenever it autosaves.

I’m just brainstorming here and if it is too complicated or you think there are not enough who would benefit from it, then fair enough. Let me know what you think.