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: Hard performance hit when highlighting JavaScript with banner-comment #2656

Closed
Schleuse opened this issue Aug 17, 2020 · 0 comments · Fixed by #2657
Closed

Performance: Hard performance hit when highlighting JavaScript with banner-comment #2656

Schleuse opened this issue Aug 17, 2020 · 0 comments · Fixed by #2657

Comments

@Schleuse
Copy link

Schleuse commented Aug 17, 2020

I've noticed a hard performance hit when trying to highlight a comment in banner-style:

//////////////////////////////////////
// EXTRA FANCY COMMENT NOBODY NEEDS //
//////////////////////////////////////
console.log("fancy");

Highlighting this snippet takes around 5 Seconds on my machine

Somebody posted a similar comment to this in our Mattermost Chat (which uses highlight.js) and rendered the channel virtually unusable due to the load on the clients.

I've built a Codepen which isolates the problem: Codepen

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

Successfully merging a pull request may close this issue.

1 participant