perf(router-core): reduce empty location pipeline work - #8310
perf(router-core): reduce empty location pipeline work#8310schiller-manuel wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe router reduces location-building overhead by avoiding unused search middleware arrays and unnecessary functional updates for object-form parameters. Tests cover empty search sharing and parameter getter behavior. A patch changeset records the update. ChangesLocation building
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: Merge Risk: ⚪ Minimal · up to The router now avoids unnecessary middleware allocation and parameter updates while preserving tested location-building behavior. No concrete merge-blocking risk is identified. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Description checkExplanation The description includes a detailed summary and benchmark results, but the required Changes section still contains the template placeholder. All checklist items and release-impact options remain unchecked, including the changeset confirmation for a published-code change. Resolution Replace the Changes placeholder with a clear change description. Mark the applicable checklist items after verification. Select the published-code release-impact option and confirm the generated changeset, or explain why the alternative applies.
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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 522e421
☁️ Nx Cloud last updated this comment at |
🚀 Changeset Version Preview1 package(s) bumped directly, 22 bumped as dependents. 🟩 Patch bumps
|
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. |
There was a problem hiding this comment.
Important
At least one additional CI pipeline execution has run since the conclusion below was written and it may no longer be applicable.
Nx Cloud has identified a possible root cause for your failed CI:
We classified this failure as an environment state issue rather than a code change. The error — a missing e2eStartDummyServer export in the compiled e2e/e2e-utils/dist/esm artifacts — points to stale build outputs unrelated to our router-core performance optimizations. No changes in this PR touch the tanstack-solid-start-e2e-basic project or the e2e utilities package.
No code changes were suggested for this issue.
Trigger a rerun:
🎓 Learn more about Self-Healing CI on nx.dev
Merging this PR will degrade performance by 7.17%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | Memory | mem client interrupted-navigations (solid) |
384.6 KB | 442.4 KB | -13.08% |
| ❌ | Memory | mem client interrupted-navigations (react) |
385.3 KB | 442.5 KB | -12.94% |
| ❌ | Memory | mem client interrupted-navigations (vue) |
389.4 KB | 446.4 KB | -12.76% |
| ❌ | Memory | mem client navigation-churn (vue) |
384.1 KB | 437.7 KB | -12.24% |
| ❌ | Memory | mem client navigation-churn (solid) |
380.6 KB | 416.8 KB | -8.68% |
| ⚡ | Simulation | client-links navigation loop (react) |
216.8 ms | 200.2 ms | +8.29% |
| ⚡ | Simulation | client-links navigation loop (vue) |
344.7 ms | 332.3 ms | +3.72% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing optimize-link-1 (522e421) with main (6494e75)
Combine object-form parameter merges into one native call. Allocate a search middleware pipeline only when it is needed, and reuse the existing empty client search value. Preserve callback and structural-sharing behavior. React Link rendering benchmark, measured separately for this commit and its parent using exact production builds: - Workload: benchmarks/client-nav/scenarios/links/react/speed.bench.ts (200 persistent Links, eight navigations per measured batch). - Apple M4, Node 24.20.0, Vitest 4.1.4, NODE_ENV=production. - 4 fresh parent processes and 8 fresh processes for this commit, each with warmupIterations=50 and time=10000 ms; counterbalanced run order. - Parent mean times (ms): 4.4180, 4.0844, 4.1333, 4.2867. - This commit mean times (ms): 3.9412, 3.8998, 3.8950, 4.2674, 4.0423, 3.8793, 3.9043, 4.1120. - Median run means: 4.2100 -> 3.9228 ms. - Incremental effect: 6.82% less time; throughput change +7.32%. - Largest within-run RME for this revision: 1.22%. Incremental minimal/full React gzip impact: +44/+49 bytes. Benchmark sources and commit implementation trees are unchanged. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
adaa9ec to
522e421
Compare
Combine object-form parameter merges into one native call. Allocate a search middleware pipeline only when it is needed, and reuse the existing empty client search value. Preserve callback and structural-sharing behavior.
React Link rendering benchmark, measured separately for this commit and its parent using exact production builds:
Incremental minimal/full React gzip impact: +44/+49 bytes. Benchmark sources and commit implementation trees are unchanged.
🎯 Changes
✅ Checklist
🚀 Release Impact
Summary by CodeRabbit
Performance
Bug Fixes