Skip to content

perf(dev): use socket to proxy connections to dev server #921

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

danielroe
Copy link
Member

@danielroe danielroe commented Jun 18, 2025

❓ 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

I expect this to be a significant improvement when running nuxt dev, but this PR is very much work-in-progress.

🚧 TODO

  • consider disabling for Nuxt versions pre-v3.18

🚧 Issues to investigate

Copy link
Contributor

github-actions bot commented Jun 18, 2025

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.88 MB β†’ 5.89 MB (+2.36 kB) +0.04%
Changeset
File Ξ” Size
home/runner/work/cli/cli/packages/nuxi/src/dev/socket.ts πŸ†• +1.98 kB 0 B β†’ 1.98 kB
home/runner/work/cli/cli/packages/nuxi/src/dev/utils.ts πŸ“ˆ +252 B (+2.91%) 8.47 kB β†’ 8.71 kB
home/runner/work/cli/cli/packages/nuxi/src/commands/dev.ts πŸ“ˆ +136 B (+1.31%) 10.1 kB β†’ 10.23 kB
View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

Asset File Size % Changed
chunks/index2.mjs 194.26 kB β†’ 196.49 kB (+2.23 kB) +1.15%
chunks/dev.mjs 27.24 kB β†’ 27.37 kB (+136 B) +0.49%

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/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/jiti.mjs 305 B 0%
chunks/index3.mjs 71.97 kB 0%
chunks/add2.mjs 12.08 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.24 kB 0%
chunks/index7.mjs 50.51 kB 0%
chunks/index8.mjs 898.9 kB 0%
shared/create-nuxt.CgADcjNr.mjs 963.63 kB 0%
shared/create-nuxt.bL0q72XX.mjs 792 B 0%
shared/create-nuxt.BG6ZphUM.mjs 294 B 0%
shared/create-nuxt.DWGAyC_k.mjs 3.9 kB 0%
shared/create-nuxt.BSm0_9Hr.mjs 107 B 0%
shared/create-nuxt.CfQLWiCQ.mjs 108.11 kB 0%
shared/create-nuxt.hK-OVEg_.mjs 18.91 kB 0%
shared/create-nuxt.d1FDxIu7.mjs 1.17 MB 0%
shared/create-nuxt.DnFB17zj.mjs 4.07 kB 0%
shared/create-nuxt.DEZsJRW8.mjs 836 B 0%
shared/create-nuxt.DoHlg__X.mjs 1.05 kB 0%
shared/create-nuxt.BAWXbfS7.mjs 15.27 kB 0%
shared/create-nuxt.1ld9DVBd.mjs 2.02 MB 0%
shared/create-nuxt.BjhZEm2-.mjs 1.75 kB 0%
shared/create-nuxt.Df_gqUYr.mjs 4.06 kB 0%
shared/create-nuxt.Vk1IrVtB.mjs 26.96 kB 0%
shared/create-nuxt.4t9faemh.mjs 43.64 kB 0%

Copy link
Contributor

github-actions bot commented Jun 18, 2025

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.29 kB β†’ 92.64 kB (+2.35 kB) +2.61%
Changeset
File Ξ” Size
home/runner/work/cli/cli/packages/nuxi/src/dev/socket.ts πŸ†• +1.97 kB 0 B β†’ 1.97 kB
home/runner/work/cli/cli/packages/nuxi/src/dev/utils.ts πŸ“ˆ +252 B (+2.91%) 8.46 kB β†’ 8.71 kB
home/runner/work/cli/cli/packages/nuxi/src/commands/dev.ts πŸ“ˆ +136 B (+1.32%) 10.09 kB β†’ 10.22 kB
View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

Asset File Size % Changed
chunks/index.mjs 11.43 kB β†’ 13.65 kB (+2.22 kB) +19.43%
chunks/dev.mjs 10.09 kB β†’ 10.22 kB (+136 B) +1.32%

Smaller

No assets were smaller

Unchanged

Asset File Size % Changed
dev/index.mjs 0 B 0%
index.mjs 236 B 0%
chunks/analyze.mjs 3.27 kB 0%
chunks/cleanup.mjs 471 B 0%
chunks/dev-child.mjs 815 B 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/add.mjs 10.17 kB 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/init.mjs 9.85 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.jA1DRKbi.mjs 1.04 kB 0%
shared/cli.BLVI_04J.mjs 1.8 kB 0%
shared/cli.yHMpVeHl.mjs 5.42 kB 0%

Copy link
Contributor

github-actions bot commented Jun 18, 2025

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.46 MB β†’ 5.46 MB (+2.37 kB) +0.04%
Changeset
File Ξ” Size
src/dev/socket.ts πŸ†• +1.98 kB 0 B β†’ 1.98 kB
src/dev/utils.ts πŸ“ˆ +252 B (+2.91%) 8.47 kB β†’ 8.71 kB
src/commands/dev.ts πŸ“ˆ +136 B (+1.31%) 10.1 kB β†’ 10.23 kB
node_modules/jiti/dist/babel.cjs πŸ“ˆ +12 B (+0.00%) 1.82 MB β†’ 1.82 MB
View detailed bundle breakdown

Added

Asset File Size % Changed
shared/nuxi.XLDZWFYb.mjs 0 B β†’ 2.02 MB (+2.02 MB) -
shared/nuxi.FlJ_pGxZ.mjs 0 B β†’ 15.26 kB (+15.26 kB) -

Removed

Asset File Size % Changed
shared/nuxi.wc1-AWrO.mjs 2.02 MB β†’ 0 B (-2.02 MB) -100%
shared/nuxi.BMIgfYLN.mjs 15.26 kB β†’ 0 B (-15.26 kB) -100%

Bigger

Asset File Size % Changed
chunks/index2.mjs 194.26 kB β†’ 196.49 kB (+2.23 kB) +1.15%
chunks/dev.mjs 27.24 kB β†’ 27.37 kB (+136 B) +0.49%

Smaller

No assets were smaller

Unchanged

Asset File Size % Changed
index.mjs 247 B 0%
dev/index.mjs 896 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/devtools.mjs 764 B 0%
chunks/generate.mjs 472 B 0%
chunks/info.mjs 4.38 kB 0%
chunks/init.mjs 665.88 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/index3.mjs 71.97 kB 0%
chunks/multipart-parser.mjs 5.11 kB 0%
chunks/add2.mjs 12.08 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.DFIyyeua.mjs 19.18 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.DZwsQJ6X.mjs 25.34 kB 0%
shared/nuxi.D5KtpA0t.mjs 984 B 0%
shared/nuxi.BjhZEm2-.mjs 1.75 kB 0%
shared/nuxi.CetGtQyZ.mjs 4.06 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%

Copy link

pkg-pr-new bot commented Jun 18, 2025

nuxt-cli-playground

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

commit: 28109ce

Copy link

codspeed-hq bot commented Jun 18, 2025

CodSpeed Performance Report

Merging #921 will not alter performance

Comparing feat/socket-remake (28109ce) with main (d5d3152)

Summary

βœ… 2 untouched benchmarks

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