View Single Post
Old 03-16-2015, 12:42 AM   #17
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,455
Karma: 27757438
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Implementing autosaves is actually trivial, about 10 lines of code, since in the calibre editor, saving occurs as an async background process in any case. Here I mean an autosave as a normal save, just automated.

However, IMO, autosaves are a terrible idea. There is no guarantee that the state of the book is valid when an autosave occurs, for example, you could in the middle of typing a tag making the html invalid, or a multi-step search and replace or whatever.

And note that BR actually said:

Quote:
Ideally a substantial 'editor' (ie one in which you're likely to spend a long time) should do protection saves at a user specified interval, and be able to recover from it in the event of a crash, power out, equipment failure or other abrupt termination.
Which is what I was directly addressing as being totally unneccessary when you have atomic save operations.
kovidgoyal is online now   Reply With Quote