-
Notifications
You must be signed in to change notification settings - Fork 302
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
Native Editor/Interactive - Perf of a really large notebook #3047
Comments
First step is just to try it out. Not necessarily fix anything |
1000 cells slows the entire thing down to a halt. Preliminary results indicate:
|
Other problems
|
Suggestion Why not re-use the monaco editors, rather than creating new ones. This way we always have a fixed number of monaco editors ever, and we can alway use a small number. This should keep the memory at bay as well and improve perf (as we're not rendering or loading monaco everytime, merely updating the code). Personally 50 is too high, we can only see around 10 at a time (varies based on height of the screen - which we can easily calculate). |
That sounds complicated. The sizing would be hard to get right. You'd have to move editors in and out of the dom as your scrolled and because they'd be different size than the code that's being scrolled into view, the view would fluctuate. |
I wonder if we could write something that would resize the same as the monaco editor, but just not have all the same parts? |
We wont need to move them (we use what we have to get the line height). Monaco editor has a fixed line line (it doesn't change based on content). Here's the flow:
|
This is wrong:
Wrapping changes that calculus. |
I tested the native editor with 100 and 300 cells. Given that the average notebook has around 30~ cells, this looks good to me. I don't expect 300 cells to execute instantly. |
The interactive window runs well with 100 cells. If you start it first and then run all cells below, it takes a while to complete but you are able to see every cell executing. I did another test of just running 400 cells, it took 27 minutes to complete and 16 minutes for anything to appear on the interactive window. Its still not great but I don't know how far we can take the performance. In my opinion, becoming slow after 100 cells sounds acceptable. |
Validated |
Right now we send all of the cells around every time one of them changes. We probably need to change this to send changes like a normal document system does.
The text was updated successfully, but these errors were encountered: