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

fix: cache promises instead of highlighters #52

Merged
merged 2 commits into from
Jun 30, 2021
Merged

fix: cache promises instead of highlighters #52

merged 2 commits into from
Jun 30, 2021

Conversation

frencojobs
Copy link
Collaborator

Closes #35

@@ -95,7 +93,7 @@ const amendSettingsForDefaults = (settings: UserConfigSettings) => {

const parsingNewFile = () => includes.clear()

////////////////// The Remark API
Copy link
Collaborator Author

@frencojobs frencojobs Jun 30, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The old comment was triggering some weird highlightings in my editor so I updated it even though it was unnecessary.

@frencojobs frencojobs requested a review from orta June 30, 2021 11:56
@frencojobs
Copy link
Collaborator Author

This fix makes it take only 30 seconds to build 123 files with a single simple twoslash code block which the current version fails to do at 80 files max.

Copy link
Contributor

@orta orta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clever

@orta
Copy link
Contributor

orta commented Jun 30, 2021

Looks like a great solution - well done!

@orta orta merged commit e7ee319 into shikijs:main Jun 30, 2021
@orta
Copy link
Contributor

orta commented Jun 30, 2021

Deployed as 1.5.0

@frencojobs frencojobs deleted the fix/ooms branch June 30, 2021 14:23
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.

OOMs on the Jest docusaurus site
2 participants