-
-
Notifications
You must be signed in to change notification settings - Fork 675
perf: optimize validate http token #4608
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
This implementation has already been added to node. |
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.
Great work! How much do we gain?
lib/core/util.js
Outdated
|
|
||
| for (let i = 0; i < characters.length; i++) { | ||
| const c = characters.charCodeAt(i) | ||
| if (!isTokenCharCode(c)) { |
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.
Can you please remove the isTokeCharCode function and just inline the change?
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.
Done)
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4608 +/- ##
=========================================
+ Coverage 0 92.93% +92.93%
=========================================
Files 0 106 +106
Lines 0 32971 +32971
=========================================
+ Hits 0 30640 +30640
- Misses 0 2331 +2331 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
lgtm with Matteo's comment
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.
lgtm

This relates to...
Header name validation performance
Changes
Status