Skip to content
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

Resolve #7889 to avoid redundant checkpoint calls on loading notebook #7926

merged 1 commit into from Mar 7, 2020


Copy link

@ikiw ikiw commented Feb 25, 2020

Resolve #7889 to avoid 3 fetch calls to load a notebook.



Code changes

listCheckpoints() gets invoked thrice when a notebook is loaded resulting in 3 checkpoint calls. The code change is to have an object- checkpointPromiseQueue that holds the promises with locaPath as key. If there is already a promise to be resolved, the pending promise object is returned back instead of creating one. And the promise reference to be cleared off from the checkpointPromiseQueue, when the promise if resolved/rejected via finally block. And as a result only 1 fetch call to checkpoint is triggered.

User-facing changes

Backwards-incompatible changes


Before Fix
Screenshot 2020-02-17 at 4 58 35 PM

After Fix
Screenshot 2020-02-25 at 11 22 45 PM

Copy link

@jupyterlab-dev-mode jupyterlab-dev-mode bot commented Feb 25, 2020

Thanks for making a pull request to JupyterLab!

To try out this branch on binder, follow this link: Binder

@ikiw ikiw changed the title Resolve #7889 to fetch only 1 checkpoint call per notebook Resolve #7889 to avoid redundant checkpoint calls on loading notebook Feb 25, 2020
Copy link

@blink1073 blink1073 left a comment


@blink1073 blink1073 merged commit aa3f0a0 into jupyterlab:master Mar 7, 2020
10 checks passed
@saulshanabrook saulshanabrook added this to the 2.0.2 milestone Mar 30, 2020
@lock lock bot added the status:resolved-locked label May 6, 2020
@lock lock bot locked as resolved and limited conversation to collaborators May 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
pkg:services status:resolved-locked
None yet

Successfully merging this pull request may close these issues.

3 participants