#5895: Limit number of worksheet snapshots
----------------------+-----------------------------------------------------
Reporter: rbeezer | Owner: rbeezer
Type: defect | Status: new
Priority: major | Milestone: sage-3.4.2
Component: notebook | Keywords:
----------------------+-----------------------------------------------------
Comment(by rbeezer):
Attached patch is a simple approach to limiting the number of snapshots of
a worksheet. But it presents a bit of a dilemma.
(a) My first version removed any older snapshots necessary to get the
total down to 30. If added to Sage this would have potentially removed
many files the first time a user closed up the notebook. Presumably some
folks might want lots of backups, and wouldn't appreciate having many of
them deleted.
(b) The version included here will delete the single oldest snapshot
immediately after creation of the 31-st snapshot. So any huge collection
of snapshots will not be touched, and small collections will not grow past
30. However, if the maximum number is later changed to something smaller,
care will be needed to be sure exisiting collections of snapshots don't
revert back to growing uncontrollably.
Comments on the above greatly appreciated, and because of this, I don't
consider this patch ready for formal review yet.
Obviously, setting {{{max_snaps = 30}}} should be user-configurable. Is
it easy to add a new option in {{{user_conf.py}}} which could then be
reset from the Sage command-line on an instance of the notebook? Or does
this require an "upgrade" of the data structures for a user's record in
{{{nb.sobj}} (and therefore becomes much more complicated)?
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5895#comment:1>
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
-~----------~----~----~----~------~----~------~--~---