perf(router-core): dehydrate SSR match IDs in one pass - #8091
Conversation
Typical route ids only contain slashes. Scan once, intern the result with a bounded cache, and skip hydrate work when the payload has no encoded characters.
|
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 (2)
Included review availability: Your plan includes up to 10 reviews per rolling hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe SSR match ID codec now uses bounded dehydration caching, single-pass escaping, and hydration fast-path handling. Tests cover round-trip behavior for IDs longer than the cache limit. ChangesSSR match ID codec
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This localized performance change has no actionable merge-blocking risk remaining after normal checks and review. Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 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 78eca7f
☁️ Nx Cloud last updated this comment at |
Merging this PR will regress 11 benchmarks
|
Summary
Split out of #8085 so bundle size and performance can be measured independently.
Typical route ids only contain slashes. Scan once, intern the result with a bounded cache (entry count and string-length limits), and skip hydrate work when the payload has no encoded characters.
Test plan
packages/router-core/tests/ssr-match-id.test.tsSummary by CodeRabbit