-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
Experiment to find the root cause of the bootlenecks #49
Comments
We had a meeting with @ellisonbg @jasongrout and @goanpeca to review the codemirror issues and the resize behavior in jlab/lumino. The following scenario tries to describe the current behavior to better understand what is going on based on the simple experiment of https://github.com/jupyterlab/benchmarks/tree/ee123a929d7130b8e9148ad70efcf15d0462b296/experiments/jlab-cell-boxpanel (1000 jlab cells wrapped into a lumino boxpanel) From the profiling, we see the repetition on each cell add of the following patttern with force layout which bring additional latency compared to 1000 jlab cells not wrapped into a lumino boxpanel) We the inspect the methods that generate a force layout. The root is at the lumino We zoom at the and we move on at the We go then into The It looks like the |
So prolly something could be done on jlab cells level rather than lumino. @ellisonbg has suggested to test with simple DIVs in a Lumino BoxPanel, which has been done in https://github.com/jupyterlab/benchmarks/tree/b9695a8d8b948e01dc56e43a6099fe8767ba0709/experiments/lumino-div-boxpanel That experiment does not show any latency when adding div, which tends to confirm the above outcomes: The forced refresh is triggered by jlab cells. |
A bit more experiments on the jlab side.
protected onUpdateRequest(msg: Message): void {
+ /*
if (this.isVisible) {
this._hasRefreshedSinceAttach = true;
+ this.editor.refresh();
}
+ */
} This lowers down (without functional impact) from 15 seconds to 10 seconds to load a 50 codecells notebook, so 5 seconds faster, with the following pattern You can see 3 parts: the fromJson, the setOption, and the third part which was before much larger due to forcedLayout. So we are good on part 3, let's see about part 2 which gives forcedLayout in every setOption. We have many places in So
|
@echarles would this be an opportunity to wrap all the |
That is a great idea. I was struggling with 2 issues with all those setOption:
|
Yes, that is what I thought, so concentrate as much as possible in a single place. Maybe create a new Also it feels like most of these options work "on initialization" (on initi method but, on creating a new code editor) so it "should" be possible to concentrate them in a single place. |
Well, if there is the method could be updated to take an |
So we need maybe to turn this export function setOption<K extends keyof CodeMirrorEditor.IConfig>(
editor: CodeMirror.Editor,
option: K,
value: CodeMirrorEditor.IConfig[K],
config: CodeMirrorEditor.IConfig
): Into something like export function setOptions(
editor: CodeMirror.Editor,
options: ICodeMirrorOptions,
config: CodeMirrorEditor.IConfig
): |
Thx @goanpeca Would be great to see your how you can progress with this. Maybe @jasongrout can give advice and background on this? |
Experiment to find the root cause of the bootlenecks in https://github.com/jupyterlab/benchmarks/tree/master/experiments
The text was updated successfully, but these errors were encountered: