Opened 14 years ago

Closed 2 years ago

#5459 closed defect (invalid)

Fix notebook and worksheet autosave intervals

Reported by: Rob Beezer Owned by: somebody
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: notebook Keywords: notebook worksheet autosave snapshots
Cc: Frédéric Chapoton Merged in:
Authors: Reviewers: Dima Pasechnik
Report Upstream: Reported upstream. Developers acknowledge bug. Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges


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/ 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 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.

Change History (8)

comment:1 Changed 9 years ago by Jeroen Demeyer

Milestone: sage-5.11sage-5.12

comment:2 Changed 9 years ago by For batch modifications

Milestone: sage-6.1sage-6.2

comment:3 Changed 9 years ago by For batch modifications

Milestone: sage-6.2sage-6.3

comment:4 Changed 8 years ago by For batch modifications

Milestone: sage-6.3sage-6.4

comment:5 Changed 8 years ago by Karl-Dieter Crisman

Report Upstream: Reported upstream. Developers acknowledge bug.
Summary: Notebook and worksheet autosave intervals, excessive snapshotsFix notebook and worksheet autosave intervals


There has been a lot of change and this is more or less disabled. But still very worth fixing.

comment:6 Changed 2 years ago by Matthias Köppe

Cc: Frédéric Chapoton added
Milestone: sage-6.4sage-duplicate/invalid/wontfix
Status: newneeds_review

Proposing to close all sagenb tickets as outdated, so that all remaining open tickets in the notebook component are about the Jupyter notebook.

comment:7 Changed 2 years ago by Dima Pasechnik

Reviewers: Dima Pasechnik
Status: needs_reviewpositive_review

comment:8 Changed 2 years ago by Frédéric Chapoton

Resolution: invalid
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.