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

perf(cli): enable Node.js compile cache #8331

Merged
merged 2 commits into from
Nov 4, 2024
Merged

Conversation

chenjiahan
Copy link
Member

Summary

Enable Node.js 22 new compile cache in Rspack CLI, this makes Node.js startup faster.

  • before:
Screenshot 2024-11-04 at 15 22 05
  • after:
Screenshot 2024-11-04 at 15 21 58

Related Links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@github-actions github-actions bot added the release: performance release: performance related release(mr only) label Nov 4, 2024
@github-actions github-actions bot added the team The issue/pr is created by the member of Rspack. label Nov 4, 2024
Copy link

netlify bot commented Nov 4, 2024

Deploy Preview for rspack canceled.

Name Link
🔨 Latest commit 25f1ed9
🔍 Latest deploy log https://app.netlify.com/sites/rspack/deploys/67288150651b450008ba8184

@h-a-n-a
Copy link
Collaborator

h-a-n-a commented Nov 4, 2024

Are we going to apply v8-compile-cache as well to the lower Node.js versions? IIUC, I suppose those are almost the same thing, right?

@chenjiahan
Copy link
Member Author

chenjiahan commented Nov 4, 2024

As far as I know, they are basically the same.

From the Node.js blog:

This is a built-in alternative to the v8-compile-cache/v8-compile-cache-lib packages, but have better performance and supports ESM.

However, I do not want to introduce v8-compile-cache as it is a third-party dependency and has some limitations. Node 22 has reached LTS so more users will be able to use the native enableCompileCache soon.

h-a-n-a
h-a-n-a previously approved these changes Nov 4, 2024
@chenjiahan chenjiahan merged commit b89df1d into main Nov 4, 2024
29 checks passed
@chenjiahan chenjiahan deleted the node_compile_cache_1104 branch November 4, 2024 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release: performance release: performance related release(mr only) team The issue/pr is created by the member of Rspack.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants