perf(ssr): reduce request cancellation overhead#7862
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
View your CI Pipeline Execution ↗ for commit ee1c29e
☁️ 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
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 server error-paths redirect (solid) |
295.2 KB | 479 KB | -38.38% |
| ❌ | Simulation | ssr server-fn during document ssr (react) |
66.3 ms | 71 ms | -6.62% |
| ❌ | Memory | mem server error-paths not-found (vue) |
331.1 KB | 341.8 KB | -3.12% |
| ⚡ | Memory | mem server peak-large-page (react) |
2,351.6 KB | 942.5 KB | ×2.5 |
| ⚡ | Memory | mem server error-paths not-found (solid) |
710.4 KB | 402.9 KB | +76.31% |
| ⚡ | Simulation | ssr server-route middleware (vue) |
73.8 ms | 56.2 ms | +31.4% |
| ⚡ | Simulation | ssr server-route middleware (react) |
73.9 ms | 56.4 ms | +31.01% |
| ⚡ | Simulation | ssr server-route middleware (solid) |
73.2 ms | 55.9 ms | +30.93% |
| ⚡ | Simulation | ssr global-mw server-route (solid) |
80.5 ms | 62 ms | +29.93% |
| ⚡ | Simulation | ssr redirect (solid) |
47.5 ms | 36.8 ms | +29.01% |
| ⚡ | Simulation | ssr global-mw server-route (vue) |
86.9 ms | 68.6 ms | +26.71% |
| ⚡ | Memory | mem server peak-large-page (solid) |
1,017 KB | 825.1 KB | +23.26% |
| ⚡ | Simulation | ssr server-route (react) |
68.3 ms | 56.6 ms | +20.67% |
| ⚡ | Simulation | ssr server-route (vue) |
67.9 ms | 56.2 ms | +20.64% |
| ⚡ | Simulation | ssr server-route (solid) |
64.8 ms | 54.2 ms | +19.47% |
| ⚡ | Memory | mem server error-paths redirect (vue) |
507.9 KB | 434.3 KB | +16.94% |
| ⚡ | Simulation | ssr global-mw server-fn (solid) |
67.1 ms | 57.9 ms | +15.94% |
| ⚡ | Simulation | ssr global-mw server-route (react) |
67.6 ms | 58.8 ms | +14.92% |
| ⚡ | Simulation | ssr redirect (react) |
43.4 ms | 37.9 ms | +14.42% |
| ⚡ | Simulation | ssr server-fn redirect (vue) |
73 ms | 64.2 ms | +13.71% |
| ... | ... | ... | ... | ... | ... |
ℹ️ 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 perf/ssr-request-cancellation (ee1c29e) with codex/match-loading-final (8ad0dc5)
* fix(router-core): complete lane match loader rewrite * fix(router-core): harden match loading lifecycle * fix(router-core): preserve hydrated context handoff * bench(memory): accept expected abort errors * perf(ssr): reduce request cancellation overhead (#7862)
Summary
next(), with guarded abort precedence and stream disposalPerformance
Controlled Solid SSR benchmarks:
The final results are within 0.3% of the pre-regression route baseline and 0.2% of the pre-regression middleware baseline, both inside benchmark noise.
A same-worktree before/after run of all 17 client bundle scenarios reported exact zero deltas for gzip, initial gzip, raw, and Brotli sizes.
Validation
@tanstack/router-core:test:unit: 99 files, 1,454 tests passed or expected-fail@tanstack/start-server-core:test:unit: 7 files, 114 tests passedgit diff --checkpassed