Skip to content

Comments

Make HLJS a singleton to prevent js boot every use#14

Open
ryanvz wants to merge 1 commit intoappstefan:mainfrom
ryanvz:use_singleton_for_js
Open

Make HLJS a singleton to prevent js boot every use#14
ryanvz wants to merge 1 commit intoappstefan:mainfrom
ryanvz:use_singleton_for_js

Conversation

@ryanvz
Copy link

@ryanvz ryanvz commented Nov 9, 2025

Currently, each CodeText instance uses its own instance of HLJS, which means the relatively expensive load function will be run every time. This creates a singleton instance to avoid this duplicate work.

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 this pull request may close these issues.

1 participant