Skip to content

perf: enable node compile cache#911

Merged
danielroe merged 2 commits intomainfrom
perf/compile-cache
Jun 11, 2025
Merged

perf: enable node compile cache#911
danielroe merged 2 commits intomainfrom
perf/compile-cache

Conversation

@danielroe
Copy link
Member

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

this enables the node compile cache following the pattern in jiti

thanks @pi0 for the tip ❤️

@danielroe danielroe requested a review from pi0 June 11, 2025 10:25
@github-actions
Copy link
Contributor

Bundle Stats — create-nuxt size comparison

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files count Total bundle size % Changed
49 5.94 MB → 5.94 MB (-4.73 kB) -0.08%
Changeset
File Δ Size
home/runner/work/cli/cli/packages/nuxi/src/commands/module/add.ts 📈 +319 B (+3.05%) 10.2 kB → 10.51 kB
home/runner/work/cli/cli/packages/nuxi/src/commands/init.ts 📉 -1.68 kB (-17.62%) 9.51 kB → 7.84 kB
home/runner/work/cli/cli/packages/nuxi/src/commands/module/_utils.ts 📉 -371 B (-34.16%) 1.06 kB → 715 B
node_modules/confbox/dist/ini.mjs 🔥 -3 kB (-100%) 3 kB → 0 B
View detailed bundle breakdown

Added

Asset File Size % Changed
shared/create-nuxt.CW_gUmz9.mjs 0 B → 2.02 MB (+2.02 MB) -
shared/create-nuxt.BbobxlDc.mjs 0 B → 1.17 MB (+1.17 MB) -
shared/create-nuxt.gDaBAh9f.mjs 0 B → 962.05 kB (+962.05 kB) -
shared/create-nuxt.CtXAJICR.mjs 0 B → 108.13 kB (+108.13 kB) -
shared/create-nuxt.CG6xz7qh.mjs 0 B → 18.91 kB (+18.91 kB) -
shared/create-nuxt.Bw6fDB2q.mjs 0 B → 15.27 kB (+15.27 kB) -
shared/create-nuxt.0zk2y7VN.mjs 0 B → 4.07 kB (+4.07 kB) -
shared/create-nuxt.D3U154lz.mjs 0 B → 3.9 kB (+3.9 kB) -
shared/create-nuxt.bNChIRtM.mjs 0 B → 1.05 kB (+1.05 kB) -
shared/create-nuxt.B5zWfcOP.mjs 0 B → 836 B (+836 B) -
shared/create-nuxt.RDIyfkmE.mjs 0 B → 792 B (+792 B) -
shared/create-nuxt.CJZJevFW.mjs 0 B → 715 B (+715 B) -
shared/create-nuxt.Cm8dbl_a.mjs 0 B → 294 B (+294 B) -

Removed

Asset File Size % Changed
shared/create-nuxt.CX3Q0i94.mjs 2.02 MB → 0 B (-2.02 MB) -100%
shared/create-nuxt.2xJbLzZy.mjs 1.17 MB → 0 B (-1.17 MB) -100%
shared/create-nuxt.DC6og8IG.mjs 963.73 kB → 0 B (-963.73 kB) -100%
shared/create-nuxt.BdjcKbH0.mjs 108.13 kB → 0 B (-108.13 kB) -100%
shared/create-nuxt.DBRJTi0i.mjs 18.91 kB → 0 B (-18.91 kB) -100%
shared/create-nuxt.7PtiE9we.mjs 15.27 kB → 0 B (-15.27 kB) -100%
shared/create-nuxt.DWHF4k3v.mjs 4.07 kB → 0 B (-4.07 kB) -100%
shared/create-nuxt.DdPxbFNP.mjs 4.06 kB → 0 B (-4.06 kB) -100%
shared/create-nuxt.CJpuxWoL.mjs 3.9 kB → 0 B (-3.9 kB) -100%
shared/create-nuxt.lSoS3Y1H.mjs 1.05 kB → 0 B (-1.05 kB) -100%
shared/create-nuxt.CANoIlAg.mjs 836 B → 0 B (-836 B) -100%
shared/create-nuxt.xXro56Jq.mjs 792 B → 0 B (-792 B) -100%
shared/create-nuxt.Bf7J5JMJ.mjs 294 B → 0 B (-294 B) -100%

Bigger

Asset File Size % Changed
chunks/add2.mjs 12.08 kB → 12.4 kB (+319 B) +2.58%

Smaller

No assets were smaller

Unchanged

Asset File Size % Changed
index.mjs 1.07 kB 0%
chunks/multipart-parser.mjs 5.11 kB 0%
chunks/multipart-parser2.mjs 4.58 kB 0%
chunks/add.mjs 6.89 kB 0%
chunks/analyze.mjs 3.27 kB 0%
chunks/build.mjs 1.96 kB 0%
chunks/cleanup.mjs 471 B 0%
chunks/dev-child.mjs 811 B 0%
chunks/dev.mjs 27.27 kB 0%
chunks/devtools.mjs 764 B 0%
chunks/generate.mjs 472 B 0%
chunks/info.mjs 4.38 kB 0%
chunks/index.mjs 274 B 0%
chunks/prepare.mjs 984 B 0%
chunks/preview.mjs 3.5 kB 0%
chunks/test.mjs 1.16 kB 0%
chunks/typecheck.mjs 1.78 kB 0%
chunks/upgrade.mjs 6.28 kB 0%
chunks/prompt.mjs 42.91 kB 0%
chunks/satisfies.mjs 116 B 0%
chunks/index2.mjs 255.05 kB 0%
chunks/jiti.mjs 305 B 0%
chunks/index3.mjs 71.99 kB 0%
chunks/search.mjs 45.85 kB 0%
chunks/xdg-open.mjs 25.32 kB 0%
chunks/node.mjs 145.67 kB 0%
chunks/index4.mjs 1.23 kB 0%
chunks/index5.mjs 5.85 kB 0%
chunks/index6.mjs 6.25 kB 0%
chunks/index7.mjs 50.54 kB 0%
chunks/index8.mjs 898.9 kB 0%
shared/create-nuxt.BSm0_9Hr.mjs 107 B 0%
shared/create-nuxt.BjhZEm2-.mjs 1.75 kB 0%
shared/create-nuxt.Vk1IrVtB.mjs 26.96 kB 0%
shared/create-nuxt.4t9faemh.mjs 43.64 kB 0%

@github-actions
Copy link
Contributor

Bundle Stats — nuxt-cli size comparison

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files count Total bundle size % Changed
32 90.47 kB → 88.73 kB (-1.73 kB) -1.92%
Changeset
File Δ Size
home/runner/work/cli/cli/packages/nuxi/src/commands/module/add.ts 📈 +319 B (+3.06%) 10.17 kB → 10.48 kB
home/runner/work/cli/cli/packages/nuxi/src/commands/init.ts 📉 -1.67 kB (-17.66%) 9.48 kB → 7.81 kB
home/runner/work/cli/cli/packages/nuxi/src/commands/module/_utils.ts 📉 -378 B (-35.49%) 1.04 kB → 687 B
View detailed bundle breakdown

Added

Asset File Size % Changed
shared/cli.C935N1ss.mjs 0 B → 687 B (+687 B) -

Removed

Asset File Size % Changed
shared/cli.jA1DRKbi.mjs 1.04 kB → 0 B (-1.04 kB) -100%

Bigger

Asset File Size % Changed
chunks/add.mjs 10.17 kB → 10.48 kB (+319 B) +3.06%

Smaller

Asset File Size % Changed
chunks/init.mjs 9.85 kB → 8.18 kB (-1.67 kB) -17.00%

Unchanged

Asset File Size % Changed
dev/index.mjs 0 B 0%
index.mjs 236 B 0%
chunks/index.mjs 11.58 kB 0%
chunks/analyze.mjs 3.27 kB 0%
chunks/cleanup.mjs 471 B 0%
chunks/dev-child.mjs 815 B 0%
chunks/dev.mjs 10.12 kB 0%
chunks/devtools.mjs 763 B 0%
chunks/generate.mjs 472 B 0%
chunks/build.mjs 1.96 kB 0%
chunks/info.mjs 4.39 kB 0%
chunks/index2.mjs 273 B 0%
chunks/search.mjs 2.96 kB 0%
chunks/prepare.mjs 984 B 0%
chunks/preview.mjs 3.5 kB 0%
chunks/test.mjs 1.16 kB 0%
chunks/typecheck.mjs 1.78 kB 0%
chunks/upgrade.mjs 6.28 kB 0%
chunks/add2.mjs 6.89 kB 0%
shared/cli.B9AmABr3.mjs 39 B 0%
shared/cli.Dvb-m6bf.mjs 792 B 0%
shared/cli.BEUGgaW4.mjs 294 B 0%
shared/cli.BSm0_9Hr.mjs 107 B 0%
shared/cli.At9IMXtr.mjs 1.23 kB 0%
shared/cli.pLQ0oPGc.mjs 836 B 0%
shared/cli.BrKZotr9.mjs 1.05 kB 0%
shared/cli.P0cplz3M.mjs 78 B 0%
shared/cli.CXdkyDQW.mjs 1.79 kB 0%
shared/cli.yHMpVeHl.mjs 5.42 kB 0%

@github-actions
Copy link
Contributor

Bundle Stats — nuxi size comparison

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files count Total bundle size % Changed
58 5.52 MB → 5.51 MB (-4.73 kB) -0.08%
Changeset
File Δ Size
src/commands/module/add.ts 📈 +319 B (+3.05%) 10.2 kB → 10.51 kB
src/commands/init.ts 📉 -1.68 kB (-17.63%) 9.51 kB → 7.84 kB
src/commands/module/_utils.ts 📉 -371 B (-34.16%) 1.06 kB → 715 B
node_modules/confbox/dist/ini.mjs 🔥 -3 kB (-100%) 3 kB → 0 B
View detailed bundle breakdown

Added

Asset File Size % Changed
shared/nuxi.Bys_J6wa.mjs 0 B → 715 B (+715 B) -

Removed

Asset File Size % Changed
shared/nuxi.CetGtQyZ.mjs 4.06 kB → 0 B (-4.06 kB) -100%

Bigger

Asset File Size % Changed
chunks/add2.mjs 12.08 kB → 12.4 kB (+319 B) +2.58%

Smaller

Asset File Size % Changed
chunks/init.mjs 665.99 kB → 664.31 kB (-1.68 kB) -0.25%

Unchanged

Asset File Size % Changed
index.mjs 247 B 0%
dev/index.mjs 961 B 0%
chunks/add.mjs 6.89 kB 0%
chunks/analyze.mjs 3.27 kB 0%
chunks/build.mjs 1.96 kB 0%
chunks/cleanup.mjs 471 B 0%
chunks/dev-child.mjs 780 B 0%
chunks/dev.mjs 27.27 kB 0%
chunks/devtools.mjs 764 B 0%
chunks/generate.mjs 472 B 0%
chunks/info.mjs 4.38 kB 0%
chunks/index.mjs 274 B 0%
chunks/prepare.mjs 984 B 0%
chunks/preview.mjs 3.5 kB 0%
chunks/test.mjs 1.16 kB 0%
chunks/typecheck.mjs 1.78 kB 0%
chunks/upgrade.mjs 6.28 kB 0%
chunks/satisfies.mjs 116 B 0%
chunks/main.mjs 15.3 kB 0%
chunks/prompt.mjs 42.91 kB 0%
chunks/jiti.mjs 305 B 0%
chunks/index2.mjs 255.05 kB 0%
chunks/index3.mjs 71.99 kB 0%
chunks/multipart-parser.mjs 5.11 kB 0%
chunks/search.mjs 45.85 kB 0%
chunks/xdg-open.mjs 25.32 kB 0%
chunks/node.mjs 145.67 kB 0%
chunks/index4.mjs 1.23 kB 0%
chunks/index5.mjs 5.85 kB 0%
chunks/multipart-parser2.mjs 4.58 kB 0%
chunks/index6.mjs 898.9 kB 0%
shared/nuxi.BLoQ2NAr.mjs 19.17 kB 0%
shared/nuxi.Dh2ZdpAd.mjs 57.22 kB 0%
shared/nuxi.CTyTlDmo.mjs 18.91 kB 0%
shared/nuxi.DHJiz6C8.mjs 792 B 0%
shared/nuxi.BtDT0y5R.mjs 294 B 0%
shared/nuxi.Cm5apyPX.mjs 2.57 kB 0%
shared/nuxi.Db0skjkt.mjs 915.23 kB 0%
shared/nuxi.D2_bzAv0.mjs 1.54 kB 0%
shared/nuxi.DtQ0anGB.mjs 4.07 kB 0%
shared/nuxi.BSm0_9Hr.mjs 107 B 0%
shared/nuxi.DMyZmNH9.mjs 836 B 0%
shared/nuxi.PB-niEBz.mjs 1.05 kB 0%
shared/nuxi.B6QVXBke.mjs 15.27 kB 0%
shared/nuxi.DZwsQJ6X.mjs 25.34 kB 0%
shared/nuxi.D5KtpA0t.mjs 984 B 0%
shared/nuxi.DYaJf8O3.mjs 2.02 MB 0%
shared/nuxi.BjhZEm2-.mjs 1.75 kB 0%
shared/nuxi.DU9QXUOf.mjs 26.96 kB 0%
shared/nuxi.BzZJv2UC.mjs 123.67 kB 0%
shared/nuxi.QWnQy_ku.mjs 5.75 kB 0%
shared/nuxi.DwmIiB7Y.mjs 12.8 kB 0%
shared/nuxi.Cgt_fOtO.mjs 42.33 kB 0%
shared/nuxi.Do0aYBCO.mjs 5.46 kB 0%
shared/nuxi.4t9faemh.mjs 43.64 kB 0%

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jun 11, 2025

Open in StackBlitz

npm i https://pkg.pr.new/create-nuxt@911
npm i https://pkg.pr.new/nuxi@911
npm i https://pkg.pr.new/@nuxt/cli@911

commit: f2ee0ed

@codspeed-hq
Copy link

codspeed-hq bot commented Jun 11, 2025

CodSpeed Performance Report

Merging #911 will degrade performances by 11.73%

Comparing perf/compile-cache (f2ee0ed) with main (4ac8e3d)

Summary

❌ 1 regressions
✅ 1 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
makes requests to dev server 87.4 ms 99.1 ms -11.73%

@danielroe danielroe merged commit 7f580c3 into main Jun 11, 2025
14 checks passed
@danielroe danielroe deleted the perf/compile-cache branch June 11, 2025 11:06
@github-actions github-actions bot mentioned this pull request Jun 11, 2025
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