Skip to content
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

[PR #9477/ce33b695 backport][3.10] Speed up matching the host header when updating client headers #9478

Conversation

patchback[bot]
Copy link
Contributor

@patchback patchback bot commented Oct 13, 2024

This is a backport of PR #9477 as merged into master (ce33b69).

What do these changes do?

update_headers is one of the most expensive areas of the client request when headers are being added.

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

@bdraco bdraco enabled auto-merge (squash) October 13, 2024 18:36
Copy link

codecov bot commented Oct 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.82%. Comparing base (bbf7da3) to head (8990b75).
Report is 1 commits behind head on 3.10.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             3.10    #9478   +/-   ##
=======================================
  Coverage   97.82%   97.82%           
=======================================
  Files         106      106           
  Lines       35064    35066    +2     
  Branches     4220     4220           
=======================================
+ Hits        34301    34303    +2     
  Misses        568      568           
  Partials      195      195           
Flag Coverage Δ
CI-GHA 97.71% <100.00%> (+<0.01%) ⬆️
OS-Linux 97.40% <100.00%> (+<0.01%) ⬆️
OS-Windows 94.93% <100.00%> (+<0.01%) ⬆️
OS-macOS 97.08% <100.00%> (-0.01%) ⬇️
Py-3.10.11 96.95% <100.00%> (+<0.01%) ⬆️
Py-3.10.15 96.89% <100.00%> (+<0.01%) ⬆️
Py-3.11.10 96.97% <100.00%> (+<0.01%) ⬆️
Py-3.11.9 97.03% <100.00%> (+<0.01%) ⬆️
Py-3.12.7 97.43% <100.00%> (+<0.01%) ⬆️
Py-3.13.0 97.42% <100.00%> (+<0.01%) ⬆️
Py-3.8.10 94.32% <100.00%> (+<0.01%) ⬆️
Py-3.8.18 96.68% <100.00%> (+<0.01%) ⬆️
Py-3.9.13 96.86% <100.00%> (+<0.01%) ⬆️
Py-3.9.20 96.80% <100.00%> (+<0.01%) ⬆️
Py-pypy7.3.16 96.41% <100.00%> (+<0.01%) ⬆️
VM-macos 97.08% <100.00%> (-0.01%) ⬇️
VM-ubuntu 97.40% <100.00%> (+<0.01%) ⬆️
VM-windows 94.93% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bdraco bdraco merged commit c8bfde8 into 3.10 Oct 13, 2024
35 of 36 checks passed
@bdraco bdraco deleted the patchback/backports/3.10/ce33b69584e7b5e9270540691912eb9d39af5490/pr-9477 branch October 13, 2024 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant