Re: [Gnumeric] Re: [PATCH] first draft of new auto-save functionality.



On Sat, 23 Feb 2002, Jody Goldberg wrote:

On Sat, Feb 23, 2002 at 02:36:18AM -0500, C. Scott Ananian wrote:

Yes, I got that impression from your last message, but I think the
simplicity of the current code has much to recommend it.  The auto-save
should be bullet-proof.  A journalled backup, although theoretically nice,
is going to absorb a lot of coding time and will never be tested enough
(because how often does anyone use the recovery code?  hopefully not
often!) to guarantee that it won't fail at the worst possible time.
Also, with any journalled system you have to worry about consistency in
the face of crashes mid-update & etc...
The current autosave approach of saving the entire file is not
feasible when working with large files.  It is simply too expensive.

emacs has this same issue.  It intelligently makes the auto-save interval
longer / saves only during idle time when it is working on a large file.
There are comments in my code where I recommend doing to same.
But this is a good example of where you might want *two* auto-save
mechanisms; the journalling code can fill in for the longer auto-save
checkpoints.  But I *don't* think you should throw out the common case
(frequent inexpensive very-safe checkpoints of small worksheets) for the
sake of the uncommon.

The other disadvantage of not doing the 'save to fd' is it make it
impossible to use the GLib mkstemp-alike (man mkstemp).  Although
I could re-code this functionality, it just seems silly.
 --scott

Attache DC Morwenstow Sudan D5 SLBM explosion justice Mk 48 Sugar Grove 
corporate globalization plutonium Blair ammunition Hawk fissionable 
              ( http://lesser-magoo.lcs.mit.edu/~cananian )





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]