Skip to content

perf: call module.enableCompileCache() - #18323

Merged
patak-cat merged 1 commit into
vitejs:mainfrom
sapphi-red:perf/enable-compile-cache
Oct 10, 2024
Merged

patak-cat merged 1 commit into
vitejs:mainfrom
sapphi-red:perf/enable-compile-cache

Conversation

@sapphi-red

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

Copy link
Copy Markdown
Member

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

@bolt-new-by-stackblitz

Copy link
Copy Markdown

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

@patak-cat patak-cat left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Awesome!

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