-
-
Notifications
You must be signed in to change notification settings - Fork 528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Notebook keeps directories for deleted cells #5177
Comments
comment:1
3.4 is for ReST tickets only. Cheers, Michael |
Attachment: trac_5177-delete-cell-dirs.patch.gz Uses twisted.internet.threads.deferToThread to delete cell directory on cell delete. Should apply cleanly on sagenb-0.5.0. |
comment:2
This hopefully won't cause any performance problems. Anyone mind giving their opinion on this? |
Author: Tim Dumol |
Attachment: trac_5177-delete-cell-dirs.2.patch.gz Trivial rebase on new patch queue. (Deletion of one empty line) |
comment:3
This is then new patch queue:
Sorry for the immense queue. |
comment:4
I can't review this, but thank you so much for doing it - it really annoyed me and it's the sort of background thing that in the long run will make Sage so much better even if no one ever sees it. |
comment:5
If I evaluate print 'Hello!'
plot(sin(x)) then "Delete All Output," "Save & quit" and reopen the worksheet, the plot (not the text) reappears. We could also delete the cells' files in (For deleting just one cell, there might be a similar but less likely race condition. For example, if after deleting a cell (with ID ) in the browser, a user pastes and saves What do most users expect/prefer? I'm adding |
Attachment: trac_5177-delete-cell-dirs.3.patch.gz Also delete files when deleting all output. Synchronous only. Replaces previous. |
comment:6
V3 deletes the output synchronously (on the server), whether it's for one cell or for the whole worksheet. I think this is much safer, since it avoids race conditions. Although deferred deletions could help performance, we already copy a cell's output synchronously. But with the appropriate locks or other synchronization constructs (e.g., "marking" cells for deletion), we could offload some tasks to other threads or to worksheet processes. |
comment:7
We should be able to doctest both "hunks" on V3. |
Attachment: trac_5177-delete-cell-dirs.4.patch.gz Add doctects to V3. Apply only this patch. sagenb repo. |
Changed author from Tim Dumol to Tim Dumol, Mitesh Patel |
comment:9
Since a major problem with the notebook right now is its performance, and this may slow it down even further, I'm putting this to "Needs work; requires optimization". |
Work Issues: Requires speed optimization |
This comment has been minimized.
This comment has been minimized.
Changed work issues from Requires speed optimization to none |
comment:10
Replying to @TimDumol:
How should this patch slow things down? The new code is only called when deleting a cell. In fact, it could even speed up the notebook as there will be fewer files around. |
comment:11
Looks good to me. I applied a modified version to the flask notebook in this commit: http://code.google.com/r/jasongrout-flask-sagenb/source/detail?r=01b77dc4c1934eb0b54a16e19037f3d89f312482 |
comment:15
I'm not sure if I should have closed this. I'll leave it as positive review for now, since I suppose it could also be applied to the current notebook. The code looks fine to apply to the current notebook, but I don't know if it will apply cleanly, etc. |
comment:16
Replying to @jasongrout:
Only the release manager should ever close tickets (with the exception of spam tickets or tickets which have no interesting content at all).
Yes, I will merge it. This reminds me of the fact that we should really discuss how to merge the new notebook, and coordination between the current notebook and the new notebook. It's a topic which I started several times, but still I don't have a good answer. |
Reviewer: Jason Grout |
comment:18
Is this issue somehow related to #10234 by any chance? |
comment:20
Replying to @jasongrout:
In which sense "related". Does this ticket also fix #10234? If you fixed #10234 already, it would be good also to merge #10234 in the current sagenb. |
Merged: sage-4.8.alpha3 |
If you delete a cell, it doesn't delete the directory for the cell, at least not very soon (it does seem that they eventually get deleted). Should it maybe when you log off the worksheet? Or maybe immediately. This is particularly bad when there are large computations or graphics involved, and may contribute to making .sws files rather large even if there are few cells.
Apply attachment: trac_5177-delete-cell-dirs.4.patch
CC: @dandrake
Component: notebook
Author: Tim Dumol, Mitesh Patel
Reviewer: Jason Grout
Merged: sage-4.8.alpha3
Issue created by migration from https://trac.sagemath.org/ticket/5177
The text was updated successfully, but these errors were encountered: