Skip to content

perf: enable node compile cache - #911

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

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

Conversation

@danielroe

Copy link
Copy Markdown
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 pi0June 11, 2025 10:25
@github-actions

Copy link
Copy Markdown
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 countTotal bundle size% Changed
495.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

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

Removed

AssetFile Size% Changed
shared/create-nuxt.CX3Q0i94.mjs2.02 MB → 0 B (-2.02 MB)-100%
shared/create-nuxt.2xJbLzZy.mjs1.17 MB → 0 B (-1.17 MB)-100%
shared/create-nuxt.DC6og8IG.mjs963.73 kB → 0 B (-963.73 kB)-100%
shared/create-nuxt.BdjcKbH0.mjs108.13 kB → 0 B (-108.13 kB)-100%
shared/create-nuxt.DBRJTi0i.mjs18.91 kB → 0 B (-18.91 kB)-100%
shared/create-nuxt.7PtiE9we.mjs15.27 kB → 0 B (-15.27 kB)-100%
shared/create-nuxt.DWHF4k3v.mjs4.07 kB → 0 B (-4.07 kB)-100%
shared/create-nuxt.DdPxbFNP.mjs4.06 kB → 0 B (-4.06 kB)-100%
shared/create-nuxt.CJpuxWoL.mjs3.9 kB → 0 B (-3.9 kB)-100%
shared/create-nuxt.lSoS3Y1H.mjs1.05 kB → 0 B (-1.05 kB)-100%
shared/create-nuxt.CANoIlAg.mjs836 B → 0 B (-836 B)-100%
shared/create-nuxt.xXro56Jq.mjs792 B → 0 B (-792 B)-100%
shared/create-nuxt.Bf7J5JMJ.mjs294 B → 0 B (-294 B)-100%

Bigger

AssetFile Size% Changed
chunks/add2.mjs12.08 kB → 12.4 kB (+319 B)+2.58%

Smaller

No assets were smaller

Unchanged

AssetFile Size% Changed
index.mjs1.07 kB0%
chunks/multipart-parser.mjs5.11 kB0%
chunks/multipart-parser2.mjs4.58 kB0%
chunks/add.mjs6.89 kB0%
chunks/analyze.mjs3.27 kB0%
chunks/build.mjs1.96 kB0%
chunks/cleanup.mjs471 B0%
chunks/dev-child.mjs811 B0%
chunks/dev.mjs27.27 kB0%
chunks/devtools.mjs764 B0%
chunks/generate.mjs472 B0%
chunks/info.mjs4.38 kB0%
chunks/index.mjs274 B0%
chunks/prepare.mjs984 B0%
chunks/preview.mjs3.5 kB0%
chunks/test.mjs1.16 kB0%
chunks/typecheck.mjs1.78 kB0%
chunks/upgrade.mjs6.28 kB0%
chunks/prompt.mjs42.91 kB0%
chunks/satisfies.mjs116 B0%
chunks/index2.mjs255.05 kB0%
chunks/jiti.mjs305 B0%
chunks/index3.mjs71.99 kB0%
chunks/search.mjs45.85 kB0%
chunks/xdg-open.mjs25.32 kB0%
chunks/node.mjs145.67 kB0%
chunks/index4.mjs1.23 kB0%
chunks/index5.mjs5.85 kB0%
chunks/index6.mjs6.25 kB0%
chunks/index7.mjs50.54 kB0%
chunks/index8.mjs898.9 kB0%
shared/create-nuxt.BSm0_9Hr.mjs107 B0%
shared/create-nuxt.BjhZEm2-.mjs1.75 kB0%
shared/create-nuxt.Vk1IrVtB.mjs26.96 kB0%
shared/create-nuxt.4t9faemh.mjs43.64 kB0%

@github-actions

Copy link
Copy Markdown
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 countTotal bundle size% Changed
3290.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

AssetFile Size% Changed
shared/cli.C935N1ss.mjs0 B → 687 B (+687 B)-

Removed

AssetFile Size% Changed
shared/cli.jA1DRKbi.mjs1.04 kB → 0 B (-1.04 kB)-100%

Bigger

AssetFile Size% Changed
chunks/add.mjs10.17 kB → 10.48 kB (+319 B)+3.06%

Smaller

AssetFile Size% Changed
chunks/init.mjs9.85 kB → 8.18 kB (-1.67 kB)-17.00%

Unchanged

AssetFile Size% Changed
dev/index.mjs0 B0%
index.mjs236 B0%
chunks/index.mjs11.58 kB0%
chunks/analyze.mjs3.27 kB0%
chunks/cleanup.mjs471 B0%
chunks/dev-child.mjs815 B0%
chunks/dev.mjs10.12 kB0%
chunks/devtools.mjs763 B0%
chunks/generate.mjs472 B0%
chunks/build.mjs1.96 kB0%
chunks/info.mjs4.39 kB0%
chunks/index2.mjs273 B0%
chunks/search.mjs2.96 kB0%
chunks/prepare.mjs984 B0%
chunks/preview.mjs3.5 kB0%
chunks/test.mjs1.16 kB0%
chunks/typecheck.mjs1.78 kB0%
chunks/upgrade.mjs6.28 kB0%
chunks/add2.mjs6.89 kB0%
shared/cli.B9AmABr3.mjs39 B0%
shared/cli.Dvb-m6bf.mjs792 B0%
shared/cli.BEUGgaW4.mjs294 B0%
shared/cli.BSm0_9Hr.mjs107 B0%
shared/cli.At9IMXtr.mjs1.23 kB0%
shared/cli.pLQ0oPGc.mjs836 B0%
shared/cli.BrKZotr9.mjs1.05 kB0%
shared/cli.P0cplz3M.mjs78 B0%
shared/cli.CXdkyDQW.mjs1.79 kB0%
shared/cli.yHMpVeHl.mjs5.42 kB0%

@github-actions

Copy link
Copy Markdown
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 countTotal bundle size% Changed
585.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

AssetFile Size% Changed
shared/nuxi.Bys_J6wa.mjs0 B → 715 B (+715 B)-

Removed

AssetFile Size% Changed
shared/nuxi.CetGtQyZ.mjs4.06 kB → 0 B (-4.06 kB)-100%

Bigger

AssetFile Size% Changed
chunks/add2.mjs12.08 kB → 12.4 kB (+319 B)+2.58%

Smaller

AssetFile Size% Changed
chunks/init.mjs665.99 kB → 664.31 kB (-1.68 kB)-0.25%

Unchanged

AssetFile Size% Changed
index.mjs247 B0%
dev/index.mjs961 B0%
chunks/add.mjs6.89 kB0%
chunks/analyze.mjs3.27 kB0%
chunks/build.mjs1.96 kB0%
chunks/cleanup.mjs471 B0%
chunks/dev-child.mjs780 B0%
chunks/dev.mjs27.27 kB0%
chunks/devtools.mjs764 B0%
chunks/generate.mjs472 B0%
chunks/info.mjs4.38 kB0%
chunks/index.mjs274 B0%
chunks/prepare.mjs984 B0%
chunks/preview.mjs3.5 kB0%
chunks/test.mjs1.16 kB0%
chunks/typecheck.mjs1.78 kB0%
chunks/upgrade.mjs6.28 kB0%
chunks/satisfies.mjs116 B0%
chunks/main.mjs15.3 kB0%
chunks/prompt.mjs42.91 kB0%
chunks/jiti.mjs305 B0%
chunks/index2.mjs255.05 kB0%
chunks/index3.mjs71.99 kB0%
chunks/multipart-parser.mjs5.11 kB0%
chunks/search.mjs45.85 kB0%
chunks/xdg-open.mjs25.32 kB0%
chunks/node.mjs145.67 kB0%
chunks/index4.mjs1.23 kB0%
chunks/index5.mjs5.85 kB0%
chunks/multipart-parser2.mjs4.58 kB0%
chunks/index6.mjs898.9 kB0%
shared/nuxi.BLoQ2NAr.mjs19.17 kB0%
shared/nuxi.Dh2ZdpAd.mjs57.22 kB0%
shared/nuxi.CTyTlDmo.mjs18.91 kB0%
shared/nuxi.DHJiz6C8.mjs792 B0%
shared/nuxi.BtDT0y5R.mjs294 B0%
shared/nuxi.Cm5apyPX.mjs2.57 kB0%
shared/nuxi.Db0skjkt.mjs915.23 kB0%
shared/nuxi.D2_bzAv0.mjs1.54 kB0%
shared/nuxi.DtQ0anGB.mjs4.07 kB0%
shared/nuxi.BSm0_9Hr.mjs107 B0%
shared/nuxi.DMyZmNH9.mjs836 B0%
shared/nuxi.PB-niEBz.mjs1.05 kB0%
shared/nuxi.B6QVXBke.mjs15.27 kB0%
shared/nuxi.DZwsQJ6X.mjs25.34 kB0%
shared/nuxi.D5KtpA0t.mjs984 B0%
shared/nuxi.DYaJf8O3.mjs2.02 MB0%
shared/nuxi.BjhZEm2-.mjs1.75 kB0%
shared/nuxi.DU9QXUOf.mjs26.96 kB0%
shared/nuxi.BzZJv2UC.mjs123.67 kB0%
shared/nuxi.QWnQy_ku.mjs5.75 kB0%
shared/nuxi.DwmIiB7Y.mjs12.8 kB0%
shared/nuxi.Cgt_fOtO.mjs42.33 kB0%
shared/nuxi.Do0aYBCO.mjs5.46 kB0%
shared/nuxi.4t9faemh.mjs43.64 kB0%

@pkg-pr-new

Copy link
Copy Markdown

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
Copy Markdown

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

BenchmarkBASEHEADChange
makes requests to dev server87.4 ms99.1 ms-11.73%

@danielroe
danielroe merged commit 7f580c3 into mainJun 11, 2025
@danielroe
danielroe deleted the perf/compile-cache branch June 11, 2025 11:06
@github-actionsgithub-actionsBot mentioned this pull request Jun 11, 2025
Sign up for freeto 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

@danielroe