Skip to content

perf(client): omit unused server action client#2222

Merged
james-elicx merged 2 commits into
cloudflare:mainfrom
TheAlexLichter:perf/omit-unused-server-action-client
Jun 22, 2026
Merged

perf(client): omit unused server action client#2222
james-elicx merged 2 commits into
cloudflare:mainfrom
TheAlexLichter:perf/omit-unused-server-action-client

Conversation

@TheAlexLichter

@TheAlexLichter TheAlexLichter commented Jun 21, 2026

Copy link
Copy Markdown
Collaborator

This PR moves browser-side server action handling into a lazy chunk and removes it entirely from production apps without server actions. Action-free client bundles shrink by about 3.7 KB gzip, while apps using actions load the runtime only when needed but gain roughly 0.8 KB total chunk overhead. It is the client-side counterpart to #2206, which removed the unused server-side action runtime.

Same pattern as #2194 and #2196.

@pkg-pr-new

pkg-pr-new Bot commented Jun 21, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@vinext/cloudflare@2222
npm i https://pkg.pr.new/vinext@2222

commit: fd79fe7

@github-actions

github-actions Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Performance benchmarks

Compared fd79fe7 against base 82d5f76 using alternating same-runner rounds. Next.js was unchanged and skipped.

4 improved · 0 regressed · 2 within ±1.5%

Scenario Framework Baseline Current Change
Client bundle size (gzip) vinext 132.8 KB 128.8 KB 🟢 -3.0%
Client entry size (gzip) vinext 118.7 KB 114.7 KB 🟢 -3.3%
Dev server cold start vinext 1.97 s 1.96 s ⚫ -0.4%
Production build time vinext 2.37 s 2.31 s 🟢 -2.5%
RSC entry closure size (gzip) vinext 92.2 KB 91.0 KB ⚫ -1.3%
Server bundle size (gzip) vinext 166.9 KB 161.7 KB 🟢 -3.1%

View detailed results and traces

🟢 improvement · 🔴 regression · ⚫ change below 1.5% · paired base/head

@james-elicx james-elicx merged commit 5739973 into cloudflare:main Jun 22, 2026
47 checks passed
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.

2 participants