#5459: Notebook and worksheet autosave intervals, excessive snapshots
----------------------+-----------------------------------------------------
 Reporter:  rbeezer   |       Owner:  somebody                             
     Type:  defect    |      Status:  new                                  
 Priority:  major     |   Milestone:  sage-3.4.1                           
Component:  notebook  |    Keywords:  notebook worksheet autosave snapshots
----------------------+-----------------------------------------------------
 There is a notebook configuration item indexed by 'save_interval'.  This
 can be set at the sage command line by instantiating a notebook object
 (call it "nb") and issuing commands like
 {{{nb.conf()['save_interval'] = int(3600)}}}   This value seems to be used
 by server/notebook/twist.py to make backup copies of nb.sobj.  It seems to
 make a snapshot of a worksheet as a side-effect, without any check if the
 snapshot is different from previous snapshots.  This is speculation, since
 I could not decipher what triggers twist.py to check and do such a save.
 Also, experimentally, I see that it happens "automatically", even if the
 worksheets and notebook are left untouched.

 There is also a per-user 'autosave_interval'  This can be accessed through
 code like {{{nb.user("admin")['autosave_interval']}}} and can also be set
 from the drop-down box in the "Settings" area of the notebook (to be
 1,3,5,7,9 minutes only).  The use of this seems a bit odd.  Any edit (but
 only edits) in the worksheet triggers a possible snapshot save.  First,
 the time since the last save is checked against the user
 autosave_interval.  If not enough time has elapsed, it exits, otherwise it
 continues towards a snapshot save.  It then checks to see if the worksheet
 has changed.  But it must have changed, since only edits trigger the
 routine.  Then it writes a snapshot.

 So in summary, a new snapshot every period given by 'save_interval' which
 is not obviously user-configurable.  No check on if the snapshot is
 different.  Every edit triggers a possible snapshot, it happens only if
 time exceeds user's autosave_interval, which can be set by the user to
 limited number of values.

 This may be an imperfect understanding of the situation, but I think it is
 confusing for a user and potentially filling up disk space and/or
 degrading performance.  So there's some room for improvement in how this
 works.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5459>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of 
Reinventing the Wheel

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to