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

slow highlight performance #2

Open
ellie-k-nam opened this issue Feb 14, 2024 · 2 comments
Open

slow highlight performance #2

ellie-k-nam opened this issue Feb 14, 2024 · 2 comments
Assignees

Comments

@ellie-k-nam
Copy link

I am very satisfied with the speed of editing.
But, Highlighting is slow when code is large.
When entering new code after several thousand lines of code, highlighting takes more than a few seconds.
Is there any solution?

@MegatronKing
Copy link
Member

@ellie-k-nam Hello, thanks for your feedback. In fact, this is a known issue. Syntax highlighting requires a large number of regular matches, but the editor does not cache the results, resulting in many meaningless repeated executions. It is feasible to consume some storage space in exchange for efficiency, so I need to modify code of re-highlight. However, the code of re-highlight is completely synchronized with highlightjs, I don't plan to make additional changes.

@TechnicJelle
Copy link

I just started using this library, and this was the first thing I noticed too. (After the fact that it has built-in support for horizontal scrolling 🥳)
It's not a dealbreaker for my project, but it would be nice if it could be improved somehow...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants