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(dev): avoid removing manifest immediately after creation #686

Merged
merged 3 commits into from
Jan 17, 2025

Conversation

danielroe
Copy link
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

Copy link

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
55 5.76 MB β†’ 5.76 MB (+121 B) +0.00%
Changeset
File Ξ” Size
node_modules/pathe/dist/shared/pathe.BLwDEnA5.mjs πŸ†• +5.06 kB 0 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

Asset File Size % Changed
shared/nuxi.BHbut6l3.mjs 0 B β†’ 285.08 kB (+285.08 kB) -
shared/nuxi.DKJl-H4O.mjs 0 B β†’ 152.13 kB (+152.13 kB) -
shared/nuxi.BvBe4Yg3.mjs 0 B β†’ 17.68 kB (+17.68 kB) -
shared/nuxi.Cq59boXt.mjs 0 B β†’ 8.04 kB (+8.04 kB) -
shared/nuxi.aFo6nWls.mjs 0 B β†’ 5.06 kB (+5.06 kB) -
shared/nuxi.Bm38xZ0h.mjs 0 B β†’ 1.12 kB (+1.12 kB) -
shared/nuxi.nD6fA4wH.mjs 0 B β†’ 804 B (+804 B) -

Removed

Asset File Size % Changed
shared/nuxi.BCPAKoPr.mjs 285.08 kB β†’ 0 B (-285.08 kB) -100%
shared/nuxi.0ipB_0_w.mjs 152.13 kB β†’ 0 B (-152.13 kB) -100%
shared/nuxi.FrQMOFOj.mjs 17.69 kB β†’ 0 B (-17.69 kB) -100%
shared/nuxi.DmrxZHCA.mjs 8.04 kB β†’ 0 B (-8.04 kB) -100%
shared/nuxi.5bNOxngo.mjs 5.09 kB β†’ 0 B (-5.09 kB) -100%
shared/nuxi.yuTSwjCe.mjs 1.11 kB β†’ 0 B (-1.11 kB) -100%
shared/nuxi.AKza-snH.mjs 804 B β†’ 0 B (-804 B) -100%

Bigger

Asset File Size % Changed
chunks/dev2.mjs 68.95 kB β†’ 69.1 kB (+148 B) +0.21%

Smaller

No assets were smaller

Unchanged

Asset File Size % Changed
index.mjs 188 B 0%
chunks/prompt.mjs 46.07 kB 0%
chunks/add.mjs 6.83 kB 0%
chunks/analyze.mjs 3.18 kB 0%
chunks/build.mjs 1.97 kB 0%
chunks/cleanup.mjs 471 B 0%
chunks/dev-child.mjs 1.75 kB 0%
chunks/dev.mjs 9.58 kB 0%
chunks/devtools.mjs 764 B 0%
chunks/generate.mjs 388 B 0%
chunks/info.mjs 4.39 kB 0%
chunks/init.mjs 805.33 kB 0%
chunks/index.mjs 274 B 0%
chunks/prepare.mjs 984 B 0%
chunks/preview.mjs 2.84 kB 0%
chunks/test.mjs 1.16 kB 0%
chunks/typecheck.mjs 1.74 kB 0%
chunks/upgrade.mjs 5.69 kB 0%
chunks/prompt2.mjs 42.92 kB 0%
chunks/satisfies.mjs 116 B 0%
chunks/main.mjs 15.34 kB 0%
chunks/index2.mjs 909.09 kB 0%
chunks/index3.mjs 17.08 kB 0%
chunks/xdg-open.mjs 25.32 kB 0%
chunks/node.mjs 134.34 kB 0%
chunks/index4.mjs 1.24 kB 0%
chunks/index5.mjs 6.55 kB 0%
chunks/index6.mjs 70.29 kB 0%
chunks/multipart-parser.mjs 5.11 kB 0%
chunks/add2.mjs 11.89 kB 0%
chunks/search.mjs 42.99 kB 0%
chunks/index7.mjs 5.87 kB 0%
chunks/index8.mjs 882.9 kB 0%
chunks/multipart-parser2.mjs 4.58 kB 0%
shared/nuxi.BBzqwRm3.mjs 130.65 kB 0%
shared/nuxi.DhZr7-yO.mjs 294 B 0%
shared/nuxi.DdI-vRyV.mjs 1.54 kB 0%
shared/nuxi.BSm0_9Hr.mjs 107 B 0%
shared/nuxi.jHNMu6i2.mjs 1.34 kB 0%
shared/nuxi.CeDCJTol.mjs 18.95 kB 0%
shared/nuxi.D0__QBAb.mjs 14.64 kB 0%
shared/nuxi.Cb8SV1Ml.mjs 6.13 kB 0%
shared/nuxi.SEuYCQjN.mjs 2.02 MB 0%
shared/nuxi.E-ZsRS8r.mjs 943 B 0%
shared/nuxi.BgENdoyd.mjs 1.76 kB 0%
shared/nuxi.ChFrgAY-.mjs 5.71 kB 0%
shared/nuxi.BPuj-7ta.mjs 42.89 kB 0%

Copy link

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
29 77.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

Asset File Size % Changed
shared/cli.oZROxEeE.mjs 0 B β†’ 1.23 kB (+1.23 kB) -
shared/cli.BXJN2WjZ.mjs 0 B β†’ 1.12 kB (+1.12 kB) -

Removed

Asset File Size % Changed
shared/cli.COREWf7f.mjs 1.24 kB β†’ 0 B (-1.24 kB) -100%
shared/cli.9BhOHB0S.mjs 1.11 kB β†’ 0 B (-1.11 kB) -100%

Bigger

Asset File Size % Changed
chunks/dev2.mjs 7.12 kB β†’ 7.26 kB (+148 B) +2.03%

Smaller

No assets were smaller

Unchanged

Asset File Size % Changed
index.mjs 200 B 0%
chunks/add.mjs 6.83 kB 0%
chunks/analyze.mjs 3.18 kB 0%
chunks/build.mjs 1.97 kB 0%
chunks/cleanup.mjs 471 B 0%
chunks/dev-child.mjs 1.76 kB 0%
chunks/dev.mjs 7 kB 0%
chunks/devtools.mjs 763 B 0%
chunks/generate.mjs 388 B 0%
chunks/info.mjs 4.39 kB 0%
chunks/init.mjs 5.05 kB 0%
chunks/index.mjs 274 B 0%
chunks/prepare.mjs 984 B 0%
chunks/preview.mjs 2.84 kB 0%
chunks/test.mjs 1.16 kB 0%
chunks/typecheck.mjs 1.74 kB 0%
chunks/upgrade.mjs 5.69 kB 0%
chunks/add2.mjs 11.7 kB 0%
chunks/search.mjs 2.94 kB 0%
shared/cli.ZjQ19XGU.mjs 5.48 kB 0%
shared/cli.mEn9q49T.mjs 804 B 0%
shared/cli.BnJuNnzK.mjs 294 B 0%
shared/cli.BSm0_9Hr.mjs 107 B 0%
shared/cli.DlcAx0De.mjs 1.04 kB 0%
shared/cli.Bzv_ksqZ.mjs 107 B 0%
shared/cli.C935N1ss.mjs 687 B 0%

Copy link

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 count Total bundle size % Changed
6 1.03 MB 0%
Changeset
File Ξ” Size
node_modules/pathe/dist/shared/pathe.BLwDEnA5.mjs πŸ†• +3.37 kB 0 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

Asset File Size % Changed
index.mjs 1.01 kB 0%
chunks/index.mjs 70.29 kB 0%
chunks/multipart-parser.mjs 5.11 kB 0%
chunks/prompt.mjs 42.92 kB 0%
chunks/satisfies.mjs 43 kB 0%
shared/create-nuxt-app.CVpZ5gnK.mjs 896.04 kB 0%

Copy link

pkg-pr-new bot commented Jan 17, 2025

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 main Jan 17, 2025
11 checks passed
@danielroe danielroe deleted the perf/manifest branch January 17, 2025 21:33
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