Uh oh!
There was an error while loading. Please reload this page.
perf(router-core): fuse static route node construction - #7981
Conversation
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThe route-tree parser now fuses case-sensitive and case-insensitive static-node construction. Tests cover node reuse and matching behavior. A benchmark measures shared and unique static prefixes. Documentation records results and compatibility details. ChangesStatic route-node construction
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 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 f59c15d
☁️ Nx Cloud last updated this comment at |
🚀 Changeset Version Preview5 package(s) bumped directly, 18 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. |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Merging this PR will regress 3 benchmarks
|
| Mode | Benchmark | BASE | HEAD | Efficiency | |
|---|---|---|---|---|---|
| ❌ | Memory | mem server peak-large-page (react) | 1.7 MB | 2.2 MB | -21.57% |
| ❌ | Memory | mem server error-paths unmatched (react) | 317.5 KB | 373.1 KB | -14.9% |
| ❌ | Simulation | ssr server-fn during document ssr (react) | 62.9 ms | 65.7 ms | -4.27% |
| ⚡ | Memory | mem server server-fn-churn (vue) | 4,147.3 KB | 270.5 KB | ×15 |
| ⚡ | Memory | mem server error-paths unmatched (vue) | 2,142.1 KB | 485.8 KB | ×4.4 |
| ⚡ | Memory | mem server error-paths redirect (solid) | 388 KB | 289.2 KB | +34.18% |
| ⚡ | Memory | mem server error-paths redirect (vue) | 338.6 KB | 306.4 KB | +10.52% |
| ⚡ | Memory | mem client navigation-churn (solid) | 580.3 KB | 537.3 KB | +7.99% |
| ⚡ | Memory | mem client navigation-churn (vue) | 1.3 MB | 1.2 MB | +4.22% |
| ⚡ | Memory | mem server error-paths not-found (react) | 277.7 KB | 267.9 KB | +3.64% |
| ⚡ | Simulation | ssr control-flow unmatched 404 (react) | 58.1 ms | 56.3 ms | +3.14% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing codex/fuse-static-route-nodes (f59c15d) with main (697ebb6)
There was a problem hiding this comment.
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 failing task (tanstack-solid-start-e2e-basic) is unrelated to the PR's touched project (@tanstack/router-core), and the root cause is a port conflict (EADDRINUSE :::37551) where another CI process occupied the port before the test server could start. A rerun of the pipeline should resolve this.
No code changes were suggested for this issue.
Trigger a rerun:
🎓 Learn more about Self-Healing CI on nx.dev
Summary
Bundle impact
Across the exact 17-scenario matrix, every scenario is 162 raw bytes smaller, gzip improves by 22-45 bytes, and initial gzip improves by 22-44 bytes. react-router.minimal improves by 162 raw / 36 gzip / 161 Brotli bytes. Brotli is mixed across the matrix (-161 to +43 bytes) and is disclosed in the checked-in result report.
Runtime
Repeated focused runs show the insensitive distributions about 6-7% faster; sensitive-unique and narrowed sensitive-shared distributions are neutral. The final implementation keeps one real sensitivity branch because an earlier branchless form produced a questionable sensitive-path result.
Validation
Integration note
This overlaps the parseSegments construction region changed by #7974. Whichever PR lands second must be rebased and have the benchmark and full bundle matrix rerun.
Summary by CodeRabbit