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: call module.enableCompileCache() #18323

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

sapphi-red
Copy link
Member

@sapphi-red sapphi-red commented Oct 10, 2024

Description

Calls the new module.enableCompileCache() API (nodejs/node#54501) which is available since Node.js 22.8.0.

$ hyperfine --warmup 3 'node ./node_modules/vite/bin/vite.js build' # without this PR
Benchmark 1: node ./node_modules/vite/bin/vite.js build
  Time (mean ± σ):     236.5 ms ±   1.4 ms    [User: 187.1 ms, System: 41.8 ms]
  Range (min … max):   235.3 ms … 239.5 ms    12 runs
 
$ hyperfine --warmup 3 'node ./node_modules/vite/bin/vite.js build' # with this PR
Benchmark 1: node ./node_modules/vite/bin/vite.js build
  Time (mean ± σ):     208.1 ms ±   3.6 ms    [User: 161.5 ms, System: 36.3 ms]
  Range (min … max):   204.1 ms … 216.8 ms    14 runs

Copy link

stackblitz bot commented Oct 10, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@sapphi-red sapphi-red added the p2-nice-to-have Not breaking anything but nice to have (priority) label Oct 10, 2024
Copy link
Member

@patak-dev patak-dev left a comment

Choose a reason for hiding this comment

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

Awesome!

@patak-dev patak-dev merged commit 18f1dad into vitejs:main Oct 10, 2024
15 checks passed
@sapphi-red sapphi-red deleted the perf/enable-compile-cache branch October 10, 2024 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p2-nice-to-have Not breaking anything but nice to have (priority)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants