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

Shiki highlighter multiple instances errors #1353

Open
1 task
Karl-Wu opened this issue Jan 5, 2025 · 1 comment
Open
1 task

Shiki highlighter multiple instances errors #1353

Karl-Wu opened this issue Jan 5, 2025 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@Karl-Wu
Copy link

Karl-Wu commented Jan 5, 2025

Describe the bug
There are many error message on Develop Console:
[Shiki] 2200 instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call highlighter.dispose() to release unused instances.

It slow down the response alot.

To Reproduce

  1. Create Multiple editor instance with code block. Just like :
image

Misc

  • Node version:
  • Package manager:
  • Browser:
  • I'm a sponsor and would appreciate if you could look into this sooner than later 💖
@Karl-Wu Karl-Wu added the bug Something isn't working label Jan 5, 2025
@YousefED
Copy link
Collaborator

YousefED commented Jan 7, 2025

@areknawo could you look into this?

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

3 participants