-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
reduced the time for the autosaveInterval from 120sec to 5sec #16893
base: main
Are you sure you want to change the base?
Conversation
Thanks for making a pull request to jupyterlab! |
…d imports same from the constant file to replace hardcoded scenarios
…d imports same from the constant file to replace hardcoded scenarios
Is 5s not too low with a risk of putting down the network and server with too many requests if many users are constantly typing? |
|
Difficult to say without real benchmarks. TBH I find 1 minute a good tradeoff, but that is something that I would prefer seeing confirmed in real, as getting more feedbacks from the community. |
okay, let's see what the rest of the team suggest |
@echarles A five-second timeout would produce, at the very most, 12 "save" command executions per minute per user. Realistically, because it only triggers 5 seconds after the most recent edit, we would see a lot fewer than this. What metrics would we need to collect to determine the impact of saving a file on server performance? |
@echarles did you take a look at @JasonWeill comment? |
I would take the biggest notebook you have ever work with, go to a place with a 2 bars wifi and see what it gives. |
Working with notebooks on remote deployments I often see long delays for save operation (2-5 seconds) because my notebooks can include large visualisations and often are 20-50 MB in size (panel/holoviz dumping all their assets in the outputs are one culprit, SVG publication-quality visualisations are another). Even though I have ultra fast broadband at home the remote Jupyter Hubs often have limited capability to receive data (and upload is usually slower than download). For example, in the UK the average upload speed is 18,4Mbps (2.3 MB/s). This means that a notebook with 50 MB takes 21s to upload for save (disregarding overheads). I think it is reasonable to change the save interval to once a minute or once every 30 seconds but I agree that once every 5 seconds is not a reasonable value for software which is often deployed on remote cloud or in HPC behind multiple hops of ssh. I would however be open to having a different default for localhost users. This is if frontend sees that the URL is localhost it could default to 5s. |
Running the server on localhost will not always imply that the content is served from localhost, see #16744 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the consensus is that 5 seconds is not the ideal default. Also, the tests are failing due to invalid relative import. Both things should be easy to fix :)
@@ -54,7 +54,7 @@ import { ISignal, Signal } from '@lumino/signaling'; | |||
import { Widget } from '@lumino/widgets'; | |||
import * as React from 'react'; | |||
import { recentsManagerPlugin } from './recents'; | |||
|
|||
import { DEFAULT_AUTOSAVE_INTERVAL } from '../../../notebook/constants'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import like will not work. It should import from @jupyterlab/notebook/lib/constants
instead, although lib
imports are best avoided.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay noted will change the 5 seconds to 10 seconds then
Given the findings in #17017 I think this could be only considered if also making sure that notebooks that have not changed do not trigger auto-save. |
References
Code changes
User-facing changes
Backwards-incompatible changes
issue number
#16892
Code changes
changed the autosaveInterval default time from 120secs to 5ecs and updated all defaults to match the new default.