perf(url): avoid full parse when reading hash on the fast path - #296
perf(url): avoid full parse when reading hash on the fast path#296danielroe wants to merge 1 commit into
Conversation
|
@danielroe is attempting to deploy a commit to the unjs Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthrough
ChangesFastURL hash support
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The change optimizes hash reads on the FastURL path while preserving native hash writes and request-target fragment exclusion; no actionable merge-blocking risk remains after normal checks and review. Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2 files. ✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 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 |
commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
context: found this profiling Nuxt's SSR path, where we build the render URL as
pathname + search + hashreading
url.hashon aFastURLcosts a full parse, because there's nohashgetterbut ... there's nothing to find in that parse on the fast path. so in that case we can optimise by returning
''. quick measurement: 500k iterations, node 22, object-form input:Summary by CodeRabbit
New Features
hashproperty to URL handling, enabling access to URL fragments.Bug Fixes