-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Speed up matching the host header when updating client headers #9477
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## master #9477 +/- ##
=======================================
Coverage 98.59% 98.59%
=======================================
Files 105 105
Lines 35092 35094 +2
Branches 4179 4179
=======================================
+ Hits 34599 34601 +2
Misses 329 329
Partials 164 164
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Backport to 3.10: 💚 backport PR created✅ Backport PR branch: Backported as #9478 🤖 @patchback |
(cherry picked from commit ce33b69)
Backport to 3.11: 💚 backport PR created✅ Backport PR branch: Backported as #9479 🤖 @patchback |
(cherry picked from commit ce33b69)
…when updating client headers (#9478) Co-authored-by: J. Nick Koston <[email protected]>
…when updating client headers (#9479) Co-authored-by: J. Nick Koston <[email protected]>
What do these changes do?
update_headers
is one of the most expensive areas of the client request when headers are being added. While its gotten a lot better lately, we can still do a bit better.Avoid calling
.lower()
on every header key for the special case.I got the idea from aio-libs/multidict#683
Are there changes in behavior for the user?
no
Is it a substantial burden for the maintainers to support this?
no