perf(solid-router): avoid republishing unchanged link state - #8005
perf(solid-router): avoid republishing unchanged link state#8005Sheraff wants to merge 2 commits into
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
View your CI Pipeline Execution ↗ for commit 1c80c35
☁️ Nx Cloud last updated this comment at |
🚀 Changeset Version PreviewNo changeset entries found. Merging this PR will not cause a version bump for any packages. |
Bundle Size Benchmarks
The following scenarios have bundle-size changes compared with the baseline:
Current gzip tracks all emitted client JS chunks. Initial gzip tracks only the entry/import graph. Trend sparkline is historical current gzip ending with this PR measurement; lower is better. |
Merging this PR will regress 3 benchmarks
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | Memory | mem client unique-location-churn (solid) |
341.6 KB | 511.1 KB | -33.16% |
| ❌ | Simulation | ssr dehydrate rich types (solid) |
87.3 ms | 97.3 ms | -10.23% |
| ❌ | Simulation | ssr dehydrate plain control (solid) |
119.6 ms | 129.2 ms | -7.49% |
| ⚡ | Simulation | client-links navigation loop (solid) |
380.4 ms | 146.9 ms | ×2.6 |
| ⚡ | Memory | mem server error-paths redirect (solid) |
588.2 KB | 288.8 KB | ×2 |
| ⚡ | Simulation | client-side navigation loop (solid) |
88 ms | 64.7 ms | +36.05% |
| ⚡ | Simulation | client-route-tree-scale navigation loop (solid) |
121 ms | 92.5 ms | +30.81% |
| ⚡ | Simulation | client-async-pipeline navigation loop (solid) |
66.4 ms | 52.4 ms | +26.54% |
| ⚡ | Simulation | client-control-flow navigation loop (solid) |
56.3 ms | 45.1 ms | +24.66% |
| ⚡ | Simulation | client-rewrites navigation loop (solid) |
76.3 ms | 63.7 ms | +19.71% |
| ⚡ | Simulation | client-history navigation loop (solid) |
53.8 ms | 46.3 ms | +16.15% |
| ⚡ | Simulation | client-loaders navigation loop (solid) |
80 ms | 69.8 ms | +14.57% |
| ⚡ | Simulation | client-preload interaction loop (solid) |
70.6 ms | 63 ms | +12.07% |
| ⚡ | Simulation | client-search-params navigation loop (solid) |
114.8 ms | 105.4 ms | +8.86% |
| ⚡ | Simulation | client-head navigation loop (solid) |
165.6 ms | 154.3 ms | +7.38% |
| ⚡ | Memory | mem client preload-churn (vue) |
776.2 KB | 736.7 KB | +5.36% |
| ⚡ | Simulation | ssr control-flow unmatched 404 (react) |
67.2 ms | 64.2 ms | +4.66% |
| ⚡ | Simulation | client-nested-params navigation loop (solid) |
236.9 ms | 226.4 ms | +4.61% |
| 👁 | Memory | mem server error-paths not-found (solid) |
416.3 KB | 717 KB | -41.93% |
| 👁 | Memory | mem client navigation-churn (solid) |
570.2 KB | 610.3 KB | -6.58% |
| ... | ... | ... | ... | ... | ... |
ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing agent/solid-link-state-memo (1c80c35) with main (c568caf)
What changed
Why
Persistent links rebuild their destination as router state changes. Even when the resulting href and active state remain identical, publishing fresh adapter state causes downstream prop work. Keeping this projection inside the existing link memo architecture lets Solid suppress that work without adding caches or side tables.
Impact
The isolated local
client-navlinks benchmark improved from the captured 41.681 ms baseline to 17.949 ms mean on this branch (about 56.9% faster). Thesolid-router.minimalbundle remained at 34,015 bytes gzip.Validation
@tanstack/solid-router:test:unit: 56 client files / 852 tests passed; 3 server files / 3 tests passed@tanstack/solid-router:test:types: TypeScript 5.6 through 7.0 passed@tanstack/solid-router:test:eslint: zero errors (existing warnings remain)@benchmarks/client-nav-links-solid:build:clientvitest benchlinks runsolid-router.minimalbundle-size scenariogit diff --check