-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Defer loading files until after layout restore #4087
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
Conversation
*/ | ||
fromStore(): Promise<void> { | ||
initialize(isNew: boolean): Promise<void> { | ||
if (isNew) { |
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 just verified that this change still works with the modelDB
in the Google Realtime stuff. I know that's going away soon, but wanted to make sure that we don't do it accidentally.
bae9ccd
to
c16ca7d
Compare
e1d07ac
to
42af83f
Compare
packages/docregistry/src/context.ts
Outdated
@@ -496,13 +425,109 @@ class Context<T extends DocumentRegistry.IModel> implements DocumentRegistry.ICo | |||
name, | |||
language: this._model.defaultKernelLanguage, | |||
}; | |||
return this.session.initialize(); | |||
this.session.initialize(); |
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 wonder if we shouldn't even wait on a checkpoint to resolve the ready promise. Thoughts?
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.
Works for me, updated.
Untitled.ipynb
Outdated
@@ -0,0 +1,44 @@ | |||
{ |
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.
Did you intend to add this file?
Thanks! This is a great improvement. |
Fixes #3572.
Summary of changes:
API:
initialize()
function toContext
(but notIContext
) that is used instead of the previoussave()
andfromStore()
(which was only onContext
).when
to load contents.Behavioral:
docmananger:open
command