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
merged 1 commit into from Mar 7, 2020

Conversation

ikiw
Copy link
Contributor

@ikiw ikiw commented Feb 25, 2020

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

References

#7889

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

NO

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

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

@jupyterlab-dev-mode
Copy link

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
Member

@blink1073 blink1073 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@blink1073 blink1073 merged commit aa3f0a0 into jupyterlab:master Mar 7, 2020
@saulshanabrook saulshanabrook added this to the 2.0.2 milestone Mar 30, 2020
@lock lock bot added the status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion. 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.
Labels
pkg:services status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 checkpoint get requests invoked to load a single notebook
3 participants