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

Performance - delay creating codemirrors #291

Closed
fonsp opened this issue Aug 14, 2020 · 2 comments
Closed

Performance - delay creating codemirrors #291

fonsp opened this issue Aug 14, 2020 · 2 comments
Labels
enhancement New feature or request frontend Concerning the HTML editor good first issue Good for newcomers help welcome If you are experienced in this topic - let us know!

Comments

@fonsp
Copy link
Owner

fonsp commented Aug 14, 2020

When you load a notebook, it creates a codemirror for every cell. We could optimise this by only creating codemirrors for cells that are not folded.

Cells that are initially folded should only create the codemirror when it is first unfolded.

Maybe we can even delete codemirrors when they are not visible? Instead of the current display: none

@fonsp fonsp added enhancement New feature or request frontend Concerning the HTML editor good first issue Good for newcomers help welcome If you are experienced in this topic - let us know! labels Aug 14, 2020
@novoselrok
Copy link
Contributor

Additional enhancement would be to initialize code mirrors only after they come into the viewport (using IntersectionObserver API).

@fonsp
Copy link
Owner Author

fonsp commented Sep 26, 2020

Solved by #484.

Strangely, the performance benefit is not noticeable, so let's not do the viewport thingy

@fonsp fonsp closed this as completed Sep 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request frontend Concerning the HTML editor good first issue Good for newcomers help welcome If you are experienced in this topic - let us know!
Projects
None yet
Development

No branches or pull requests

2 participants