perf(router-core): wildcard suffix offset comparison - #8147
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 |
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. |
|
View your CI Pipeline Execution ↗ for commit 5eb2e2c
☁️ Nx Cloud last updated this comment at |
🚀 Changeset Version Preview4 package(s) bumped directly, 19 bumped as dependents. 🟩 Patch bumps
|
Merging this PR will degrade performance by 7.28%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | Memory | mem server peak-large-page (react) |
1.2 MB | 2.1 MB | -43.37% |
| ❌ | Memory | mem server error-paths unmatched (react) |
544.1 KB | 686.9 KB | -20.8% |
| ❌ | Memory | mem server serialization-payload (solid) |
4.4 MB | 4.7 MB | -6.47% |
| ❌ | Memory | mem server error-paths not-found (solid) |
557.9 KB | 593.1 KB | -5.94% |
| ❌ | Memory | mem server request-churn (react) |
662.6 KB | 691.4 KB | -4.17% |
| ❌ | Memory | mem server server-fn-churn (react) |
378.9 KB | 394.6 KB | -3.98% |
| ❌ | Memory | mem client navigation-churn (solid) |
592.5 KB | 616.9 KB | -3.95% |
| ⚡ | Memory | mem server error-paths redirect (react) |
318.9 KB | 291.5 KB | +9.42% |
| ⚡ | Memory | mem server aborted-requests (vue) |
1.1 MB | 1 MB | +5.55% |
| ⚡ | Memory | mem server error-paths redirect (solid) |
382.2 KB | 365 KB | +4.7% |
| ⚡ | Memory | mem server serialization-payload (vue) |
4.5 MB | 4.3 MB | +3.28% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing perf/task8-wildcard-suffix-offsets (5eb2e2c) with main (d83a896)
Summary
getNodeMatchallocatedparts.slice(index).join('/')per suffixed-wildcard candidate per stack frame — worst-case quadratic copying during matching.Decision gates
(Bench note: an earlier run showed only 9.4% because memoization masked misses; restructured so candidates actually evaluate per frame.)
Correctness
Differential test vs vendored old implementation: 20k+ seeded generated tree/path/fuzzy comparisons + edge cases (case-insensitivity,
/in suffix, remainder shorter than suffix, trailing slash) — all identical.test:unit ✅ (1608 tests) · eslint ✅ · types ✅
Full details:
RESULT-perf-task8.mdon the branch.