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

Scrolling is slow when many words are underlined in Chromium #132

Open
krassowski opened this issue Jul 5, 2023 · 0 comments
Open

Scrolling is slow when many words are underlined in Chromium #132

krassowski opened this issue Jul 5, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@krassowski
Copy link
Collaborator

Description

The wavy-underline setting uses text-decoration which is expensive to render. In a lorem ipsum with 150 paragraphs (13 227 words), most of which get highlighted this can lead to a visible lag when scrolling with wavy-underline enabled (it currently is opt-in).

Reproduce

  1. Generate 150 paragraphs with https://www.lipsum.com/
  2. Paste it into a file
  3. Use the default background-box theme
  4. Scroll in the file, see it works smoothly
  5. Switch theme to wavy-underline
  6. See that scrolling is laggy

Expected behavior

Scrolling is smooth.

The native underline is expensive because it tries to pack the waves nicely to match word boundaries and support different styles. We could explore:

  • rendering wavy underline using SVG or png background rather than the expensive underline wavelets
  • fixing the performance upstream in Chromium

Context

This is seen in all versions of extension (0.7.x and 0.8.2) regardless of JupyterLab and CodeMirror version.

@krassowski krassowski added the bug Something isn't working label Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant