-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Move syntax highlighting to web worker #11017
Conversation
3362bae
to
9eeb2c7
Compare
It might be worth removing |
Regarding removal of |
Fixed a race condition that happened with multiple outstanding highlight requests by adding a |
Codecov Report
@@ Coverage Diff @@
## master #11017 +/- ##
==========================================
- Coverage 43.43% 43.41% -0.02%
==========================================
Files 597 597
Lines 84628 84628
==========================================
- Hits 36754 36741 -13
- Misses 43344 43352 +8
- Partials 4530 4535 +5
Continue to review full report at Codecov.
|
This should eliminate page freezes when loading big files/diff. `highlightBlock` is needed to preserve existing nodes when highlighting and for that, highlight.js needs access to the DOM API so I added a DOM implementation to make it work, which adds around 300kB to the output file size of the lazy-loaded `highlight.js`.
Make lgtm work |
This should eliminate page freezes when loading big files/diff. `highlightBlock` is needed to preserve existing nodes when highlighting and for that, highlight.js needs access to the DOM API so I added a DOM implementation to make it work, which adds around 300kB to the output file size of the lazy-loaded `highlight.js`. Co-authored-by: Lauris BH <[email protected]>
This should eliminate page freezes when loading big files/diff.
highlightBlock
is needed to preserve our existing HTML nodes when highlighting and for that, highlight.js needs access to the DOM API so I added a DOM implementation to make it work, which adds around 300kB to the output file size of the lazy-loadedhighlight.js
chunk.