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

Enable Node.js compile cache on CLI when module.enableCompileCache() is available #624

Merged
merged 4 commits into from
Dec 1, 2024

Conversation

yhatt
Copy link
Member

@yhatt yhatt commented Dec 1, 2024

Node.js v22.8.0 and later have been supported module.enableCompileCache(), to enable V8 compile cache. This PR adds the patch process to apply compile cache in early.

Effectively this is retry of #139. v8-compile-cache had been removed in #521 due to incompatibillity with ES Modules.

Benchmark of time ./marp-cli.js in my environment shows x1.22 speed up. (Use average time of 10 executions)

main enable-compile-cache
0.497s 0.406s

Note

The compile cache would not be enabled when Marp CLI was executed from Node.js API.

@yhatt yhatt merged commit 4628dda into main Dec 1, 2024
1 check passed
@yhatt yhatt deleted the enable-compile-cache branch December 1, 2024 15:31
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