Skip to content

perf(signals): fold verdict and lane upkeep out of builds without those engines - #4418

Merged
ryansolid merged 2 commits into
nextfrom
claude/project-thread-x1ore2-floor-trim
Oct 29, 2026
Merged

ryansolid merged 2 commits into
nextfrom
claude/project-thread-x1ore2-floor-trim

Conversation

@ryansolid

Copy link
Copy Markdown
Member

Before: hello world (app: compiled floor) ships 10,059 B brotli, which is over the 10 KB stop. About half of what the 2026-10-29 batch added to it is bookkeeping that only the verdict engine (isPending/latest) or the lane engine (optimistic) ever reads.

After: hello world is 9,967 B brotli (−92 B, −285 B minified), measured locally on next @ 9545058. Local numbers matched CI exactly for the floors on the batch commits. Every scenario without the verdict engine shrinks: the core floor by −96 B, the render floor by −87 B, hydrating by −98 B and CSR by −103 B brotli.

How: a hook a bundle never installs is a never-assigned let, and the minifier folds code guarded on it. So these now sit behind their engine's hook:

  • CONFIG_ASYNC upkeep (fix(signals): an async memo over a verdict memo asks each question once #4397: the set in handleAsync, and the clears on a sync answer, an error and a loading-window NotReady, merged into one clear in recompute's catch). The bit is read only by the verdict engine.
  • the verdict re-derive checks on CONFIG_VERDICT in propagateStatus, settlePendingSource, reruns, and recompute's posture write, plus read's verdict-flag inheritance. CONFIG_VERDICT is only ever set by the verdict engine.
  • recompute's pass-lane seat and both restores, and read's lane/verdict flight check. passLane is only ever set by the lane engine.

None of the guards changes behavior in any build. Where an engine is installed, the guarded code runs exactly as before. Where it isn't, the guarded code could never have done anything.

Cost: builds with the verdict engine carry the guards, about +34 B minified and +17 B brotli on signals: + isPending/latest. Two inline caps are over on this head, signals: + isPending/latest and page: live + router. A follow-up push on this PR re-records them from this PR's CI numbers.

Tests: signals 5,982 passed; web client and hydrate passed; web server 1 failure that fails identically on next in this checkout (server-functions-adapter-request rebuild-failure case); solid 1 environment failure (unbuilt packages/universal/dist).


Generated by Claude Code

…se engines

Hello world (compiled floor) 10,059 -> 9,967 B brotli. The verdict
engine's CONFIG_ASYNC upkeep, its CONFIG_VERDICT re-derive and flag
checks, and recompute's pass-lane seat and restores are guarded on the
engines' hooks, which the minifier folds when nothing installs them.
CONFIG_VERDICT is only ever set by the verdict engine and passLane only
by the lane engine, so the guards change no behavior in any build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2
@changeset-bot

changeset-bot Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 6c5ab82

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 15 packages
Name Type
@solidjs/signals Patch
test-integration Patch
@solidjs/web Patch
@solidjs/babel-plugin Patch
@solidjs/compiler Patch
@solidjs/diagnostics Patch
@solidjs/element Patch
@solidjs/h Patch
@solidjs/html Patch
solid-js Patch
@solidjs/universal Patch
board-example Patch
canvas-example Patch
server-dbmon-example Patch
todos-server-example Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Size (brotli, eager entry chunk)

scenario head vs base minified vs base minified vs recorded cap lazy chunks (not counted)
signals: core floor (createSignal/Memo/Effect/Root/flush) 7.42 KB −96 B (−1.3%) −282 B −282 B 7.53 KB ✅
signals: + createStore 14.95 KB −95 B (−0.6%) −290 B −290 B 15.06 KB ✅
signals: + isPending/latest 11.04 KB +17 B (+0.2%) +34 B 0 B 11.05 KB ✅
signals: + until/refresh (truth readers, no optimism) 8.05 KB −93 B (−1.1%) −286 B −286 B 8.16 KB ✅
app: render + one signal (the simple-app floor) 9.78 KB −87 B (−0.9%) −285 B −285 B 9.88 KB ✅
app: hydrating (no stores) with Show/For/Loading/Errored/lazy 18.69 KB −98 B (−0.5%) −261 B −261 B 18.80 KB ✅ lazy-page.js 0.04 KB
app: hydrating + every store primitive family 32.41 KB +5 B (+0.0%) −164 B −164 B 32.42 KB ✅ lazy-page.js 0.04 KB
app: CSR with Show/For/Loading/Errored/lazy 13.42 KB −103 B (−0.8%) −262 B −262 B 13.53 KB ✅ lazy-page.js 0.04 KB
app: CSR, observe tier (same app on the observe artifacts) 15.19 KB −89 B (−0.6%) −260 B −260 B 15.29 KB ✅ lazy-page.js 0.04 KB
app: CSR, observe tier + attribution engine enabled 29.77 KB −64 B (−0.2%) −261 B −261 B 29.85 KB ✅ lazy-page.js 0.04 KB
app: compiled floor (one template, one text hole, one delegated click) 9.97 KB −92 B (−0.9%) −285 B −285 B 10.07 KB ✅
app: compiled CSR (JSX todo app: spread/merge/omit, events, class/style, keyed For, Show, Loading + lazy, store) 26.29 KB −87 B (−0.3%) −264 B −264 B 26.40 KB ✅ stats.js 0.18 KB
app: compiled hydrating (the same JSX todo app through hydrate(), compiled hydratable) 32.44 KB −130 B (−0.4%) −258 B −258 B 32.58 KB ✅ stats.js 0.20 KB
frames: eager client consumer (frames client + transport, lazy codec) 11.75 KB 0 B 0 B 0 B 11.77 KB ✅
page: base server components (hydrating + dynamic + frames + sf reference) 33.64 KB −130 B (−0.4%) −259 B −259 B 33.78 KB ✅ assets.js 0.78 KB, decode.js 7.09 KB, lazy-page.js 0.04 KB, regions.js 1.06 KB, trace.js 9.03 KB, wire.js 3.47 KB
page: live server components (base + live/GET + action + isPending/latest) 38.63 KB −25 B (−0.1%) +37 B +37 B 38.67 KB ✅ assets.js 0.78 KB, decode.js 7.09 KB, lazy-page.js 0.04 KB, regions.js 1.06 KB, trace.js 9.03 KB, wire.js 3.47 KB
page: compiled base server components (the base page as JSX: templates with class/style/attributes/events, For/Show; no spread) 35.63 KB −46 B (−0.1%) −256 B −256 B 35.69 KB ✅ assets.js 0.78 KB, decode.js 7.09 KB, regions.js 1.06 KB, sc-comments.js 0.20 KB, trace.js 8.99 KB, wire.js 3.47 KB
page: compiled live server components (the compiled base page + live/GET + action + isPending/latest) 42.61 KB +15 B (+0.0%) +36 B 0 B 42.62 KB ✅ eager (counted): web.js 22.73 KB; assets.js 0.78 KB, decode.js 7.09 KB, regions.js 1.07 KB, sc-comments.js 0.19 KB, trace.js 9.07 KB, wire.js 3.47 KB
page: base + router (base page + @solidjs/router: createRouter, two routes, preload, useNavigate) 41.06 KB −245 B (−0.6%) −259 B −259 B 41.32 KB ✅ assets.js 0.78 KB, decode.js 7.09 KB, lazy-page.js 0.04 KB, regions.js 1.06 KB, server.js 1.03 KB, serverForms.js 3.57 KB, trace.js 9.02 KB, wire.js 3.48 KB
page: live + router (live page + @solidjs/router: createRouter, two routes, preload, useNavigate) 48.30 KB +25 B (+0.1%) +37 B 0 B 48.31 KB ✅ eager (counted): client.js 27.88 KB; assets.js 0.78 KB, decode.js 7.09 KB, lazy-page.js 0.04 KB, regions.js 1.07 KB, server.js 1.03 KB, serverForms.js 3.30 KB, trace.js 9.00 KB, wire.js 3.49 KB
server: floor (getRequestEvent + isServer) 1.27 KB 0 B 0 B 0 B 1.34 KB ✅
server: renderToString (the server-render floor) 22.79 KB 0 B 0 B 0 B 22.80 KB ✅

Bundled with Rolldown (what Vite ships), brotli q11, decimal KB. A scenario fails only when it is over its brotli cap and its minified size is more than 20 B over the minified recorded with the cap; over the cap within that allowance is brotli layout noise and passes with a warning. Caps and their recorded minified in scripts/size/scenarios.js; the floor and page caps in floor-caps.json are frozen (lower only, or Size-Exception: in the PR body). npm run ratchet lowers caps per RC; it never raises one (scripts/size/README.md).

isPending/latest 11.03 -> 11.05 KB (30,407 B), compiled live page
42.61 -> 42.62 KB (125,165 B), live + router 48.29 -> 48.31 KB
(142,427 B), from this PR's CI size run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2
@coveralls

coveralls commented Oct 29, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 40905879905

Coverage remained the same at 78.516%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 1355
Covered Lines: 1125
Line Coverage: 83.03%
Relevant Branches: 1084
Covered Branches: 790
Branch Coverage: 72.88%
Branches in Coverage %: Yes
Coverage Strength: 30.09 hits per line

💛 - Coveralls

@codspeed

codspeed Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Merging this PR will degrade performance by 12.13%

2 warnings

⚠️ 2 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

⚠️ Base and head ran on different runner types

Some benchmarks with significant performance changes were compared across different runner types, so the changes might not come from the code. Run base and head on the same runner type, or use CodSpeed Macro Runners for more stable results.

Learn more about Macro Runners

Open the report in CodSpeed to investigate

❌ 3 regressed benchmarks
✅ 197 untouched benchmarks
⏩ 5 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
❌ projection derive: write one NESTED field (reference) 2.1 ms 2.7 ms -21.35%
❌ arrow in template 11 ms 11.9 ms -7.74%
❌ memo + sync render effect only (reference) 28.4 ms 30.3 ms -6.52%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing claude/project-thread-x1ore2-floor-trim (6c5ab82) with next (9545058)

Open in CodSpeed

Footnotes

  1. 5 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

Copy link
Copy Markdown
Member Author

CodSpeed's −12% on 6c5ab82 doesn't hold up as a regression from this diff:

Size gate, tests and babel-8 are green. Hello world is 9,967 B brotli, down from 10,059 B.


Generated by Claude Code

@ryansolid
ryansolid merged commit 0f5b150 into next Oct 29, 2026
8 of 9 checks passed
ryansolid added a commit that referenced this pull request Oct 29, 2026
…4414 (#4421)

* chore(size): re-record the ledger on next @ 5d57e12 after #4418 and #4414

Caps at CI brotli + 10 B rounded up to 0.01 KB, recorded minified = CI
measured (next @ 5d57e12, size job 123602802067). #4418's floor trim
lowers most caps; #4414's truncation sweep (+~100 B minified in solid's
hydration client) raises the compiled base page, the compiled live page
and live + router's recorded minified. Hello world cap 10.07 -> 9.98 KB.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2

* chore(size): move the frozen floors to next @ 5d57e12

Size-Exception in the PR body: the live page grows with #4414; the
other floors drop with #4418.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2

---------

Co-authored-by: Claude <noreply@anthropic.com>
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.

3 participants