Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork753
perf(urlencoded): move empty-body guard to avoid extra function closure#647
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
perf(urlencoded): move empty-body guard to avoid extra function closure#647
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Pull Request Overview
This PR optimizes the URL-encoded body parsing by eliminating an extra function closure and moving the empty-body check directly into the parser function. The change improves performance by removing an unnecessary wrapper function while maintaining identical behavior.
- Moves empty-body guard from wrapper function to main parser function
- Eliminates extra function closure creation
- Changes
vartoconstfor the parser assignment
Tip: Customize your code reviews with copilot-instructions.md.Create the file orlearn how to get started.
Uh oh!
There was an error while loading.Please reload this page.
Inlines the empty-body check into the parser returned by
createQueryParser, removing the extra wrapper function. The behavior is unchanged but we get a minor perf/alloc win by not creating a extra closure.