Skip to content

perf(dev): avoid removing manifest immediately after creation - #686

Merged
danielroe merged 3 commits into
mainfrom
perf/manifest
Jan 17, 2025
Merged

perf(dev): avoid removing manifest immediately after creation#686
danielroe merged 3 commits into
mainfrom
perf/manifest

Conversation

@danielroe

Copy link
Copy Markdown
Member

🔗 Linked issue

❓ 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

two small perf changes - this avoids writing a file which will immediately be removed, and also doesn't block the directory clearing until the file has been written

it also persists nuxt.json even when clearing the build directory

@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
555.76 MB → 5.76 MB (+121 B)+0.00%
Changeset
FileΔSize
node_modules/pathe/dist/shared/pathe.BLwDEnA5.mjs🆕 +5.06 kB0 B → 5.06 kB
src/utils/dev.ts📈 +148 B (+2.03%)7.13 kB → 7.27 kB
src/utils/fs.ts📈 +13 B (+1.15%)1.11 kB → 1.12 kB
src/utils/nuxt.ts📉 -8 B (-0.63%)1.24 kB → 1.23 kB
node_modules/pathe/dist/shared/pathe.UZ-hd4nF.mjs🔥 -5.09 kB (-100%)5.09 kB → 0 B
View detailed bundle breakdown

Added

AssetFile Size% Changed
shared/nuxi.BHbut6l3.mjs0 B → 285.08 kB (+285.08 kB)-
shared/nuxi.DKJl-H4O.mjs0 B → 152.13 kB (+152.13 kB)-
shared/nuxi.BvBe4Yg3.mjs0 B → 17.68 kB (+17.68 kB)-
shared/nuxi.Cq59boXt.mjs0 B → 8.04 kB (+8.04 kB)-
shared/nuxi.aFo6nWls.mjs0 B → 5.06 kB (+5.06 kB)-
shared/nuxi.Bm38xZ0h.mjs0 B → 1.12 kB (+1.12 kB)-
shared/nuxi.nD6fA4wH.mjs0 B → 804 B (+804 B)-

Removed

AssetFile Size% Changed
shared/nuxi.BCPAKoPr.mjs285.08 kB → 0 B (-285.08 kB)-100%
shared/nuxi.0ipB_0_w.mjs152.13 kB → 0 B (-152.13 kB)-100%
shared/nuxi.FrQMOFOj.mjs17.69 kB → 0 B (-17.69 kB)-100%
shared/nuxi.DmrxZHCA.mjs8.04 kB → 0 B (-8.04 kB)-100%
shared/nuxi.5bNOxngo.mjs5.09 kB → 0 B (-5.09 kB)-100%
shared/nuxi.yuTSwjCe.mjs1.11 kB → 0 B (-1.11 kB)-100%
shared/nuxi.AKza-snH.mjs804 B → 0 B (-804 B)-100%

Bigger

AssetFile Size% Changed
chunks/dev2.mjs68.95 kB → 69.1 kB (+148 B)+0.21%

Smaller

No assets were smaller

Unchanged

AssetFile Size% Changed
index.mjs188 B0%
chunks/prompt.mjs46.07 kB0%
chunks/add.mjs6.83 kB0%
chunks/analyze.mjs3.18 kB0%
chunks/build.mjs1.97 kB0%
chunks/cleanup.mjs471 B0%
chunks/dev-child.mjs1.75 kB0%
chunks/dev.mjs9.58 kB0%
chunks/devtools.mjs764 B0%
chunks/generate.mjs388 B0%
chunks/info.mjs4.39 kB0%
chunks/init.mjs805.33 kB0%
chunks/index.mjs274 B0%
chunks/prepare.mjs984 B0%
chunks/preview.mjs2.84 kB0%
chunks/test.mjs1.16 kB0%
chunks/typecheck.mjs1.74 kB0%
chunks/upgrade.mjs5.69 kB0%
chunks/prompt2.mjs42.92 kB0%
chunks/satisfies.mjs116 B0%
chunks/main.mjs15.34 kB0%
chunks/index2.mjs909.09 kB0%
chunks/index3.mjs17.08 kB0%
chunks/xdg-open.mjs25.32 kB0%
chunks/node.mjs134.34 kB0%
chunks/index4.mjs1.24 kB0%
chunks/index5.mjs6.55 kB0%
chunks/index6.mjs70.29 kB0%
chunks/multipart-parser.mjs5.11 kB0%
chunks/add2.mjs11.89 kB0%
chunks/search.mjs42.99 kB0%
chunks/index7.mjs5.87 kB0%
chunks/index8.mjs882.9 kB0%
chunks/multipart-parser2.mjs4.58 kB0%
shared/nuxi.BBzqwRm3.mjs130.65 kB0%
shared/nuxi.DhZr7-yO.mjs294 B0%
shared/nuxi.DdI-vRyV.mjs1.54 kB0%
shared/nuxi.BSm0_9Hr.mjs107 B0%
shared/nuxi.jHNMu6i2.mjs1.34 kB0%
shared/nuxi.CeDCJTol.mjs18.95 kB0%
shared/nuxi.D0__QBAb.mjs14.64 kB0%
shared/nuxi.Cb8SV1Ml.mjs6.13 kB0%
shared/nuxi.SEuYCQjN.mjs2.02 MB0%
shared/nuxi.E-ZsRS8r.mjs943 B0%
shared/nuxi.BgENdoyd.mjs1.76 kB0%
shared/nuxi.ChFrgAY-.mjs5.71 kB0%
shared/nuxi.BPuj-7ta.mjs42.89 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
2977.19 kB → 77.34 kB (+153 B)+0.19%
Changeset
FileΔSize
home/runner/work/cli/cli/packages/nuxi/src/utils/dev.ts📈 +148 B (+2.03%)7.12 kB → 7.26 kB
home/runner/work/cli/cli/packages/nuxi/src/utils/fs.ts📈 +13 B (+1.15%)1.11 kB → 1.12 kB
home/runner/work/cli/cli/packages/nuxi/src/utils/nuxt.ts📉 -8 B (-0.63%)1.24 kB → 1.23 kB
View detailed bundle breakdown

Added

AssetFile Size% Changed
shared/cli.oZROxEeE.mjs0 B → 1.23 kB (+1.23 kB)-
shared/cli.BXJN2WjZ.mjs0 B → 1.12 kB (+1.12 kB)-

Removed

AssetFile Size% Changed
shared/cli.COREWf7f.mjs1.24 kB → 0 B (-1.24 kB)-100%
shared/cli.9BhOHB0S.mjs1.11 kB → 0 B (-1.11 kB)-100%

Bigger

AssetFile Size% Changed
chunks/dev2.mjs7.12 kB → 7.26 kB (+148 B)+2.03%

Smaller

No assets were smaller

Unchanged

AssetFile Size% Changed
index.mjs200 B0%
chunks/add.mjs6.83 kB0%
chunks/analyze.mjs3.18 kB0%
chunks/build.mjs1.97 kB0%
chunks/cleanup.mjs471 B0%
chunks/dev-child.mjs1.76 kB0%
chunks/dev.mjs7 kB0%
chunks/devtools.mjs763 B0%
chunks/generate.mjs388 B0%
chunks/info.mjs4.39 kB0%
chunks/init.mjs5.05 kB0%
chunks/index.mjs274 B0%
chunks/prepare.mjs984 B0%
chunks/preview.mjs2.84 kB0%
chunks/test.mjs1.16 kB0%
chunks/typecheck.mjs1.74 kB0%
chunks/upgrade.mjs5.69 kB0%
chunks/add2.mjs11.7 kB0%
chunks/search.mjs2.94 kB0%
shared/cli.ZjQ19XGU.mjs5.48 kB0%
shared/cli.mEn9q49T.mjs804 B0%
shared/cli.BnJuNnzK.mjs294 B0%
shared/cli.BSm0_9Hr.mjs107 B0%
shared/cli.DlcAx0De.mjs1.04 kB0%
shared/cli.Bzv_ksqZ.mjs107 B0%
shared/cli.C935N1ss.mjs687 B0%

@github-actions

Copy link
Copy Markdown
Contributor

Bundle Stats — create-nuxt-app 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
61.03 MB0%
Changeset
FileΔSize
node_modules/pathe/dist/shared/pathe.BLwDEnA5.mjs🆕 +3.37 kB0 B → 3.37 kB
node_modules/pathe/dist/shared/pathe.UZ-hd4nF.mjs🔥 -3.37 kB (-100%)3.37 kB → 0 B
View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

No assets were bigger

Smaller

No assets were smaller

Unchanged

AssetFile Size% Changed
index.mjs1.01 kB0%
chunks/index.mjs70.29 kB0%
chunks/multipart-parser.mjs5.11 kB0%
chunks/prompt.mjs42.92 kB0%
chunks/satisfies.mjs43 kB0%
shared/create-nuxt-app.CVpZ5gnK.mjs896.04 kB0%

@pkg-pr-new

Copy link
Copy Markdown

Open in Stackblitz

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

commit: ed8ecf2

@danielroe
danielroe merged commit c5813db into mainJan 17, 2025
@danielroe
danielroe deleted the perf/manifest branch January 17, 2025 21:33
This was referenced Jan 29, 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