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

Improve client performance when there are no auto headers to skip #10049

Merged
merged 8 commits into from
Nov 26, 2024

Conversation

bdraco
Copy link
Member

@bdraco bdraco commented Nov 26, 2024

Skipping auto headers is a rarely used feature.

  • Avoid making an empty CIMultiDict each request that we will throw away
  • Avoid all the contains checks when there are no auto headers to skip
  • Some unreachable branching has been removed from update_body_from_data
Screenshot 2024-11-26 at 4 20 04 PM Screenshot 2024-11-26 at 4 10 07 PM

Copy link

codecov bot commented Nov 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.73%. Comparing base (c3c11a6) to head (047ab36).
Report is 1 commits behind head on master.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #10049   +/-   ##
=======================================
  Coverage   98.73%   98.73%           
=======================================
  Files         121      121           
  Lines       36768    36771    +3     
  Branches     4393     4392    -1     
=======================================
+ Hits        36303    36307    +4     
  Misses        314      314           
+ Partials      151      150    -1     
Flag Coverage Δ
CI-GHA 98.62% <100.00%> (+<0.01%) ⬆️
OS-Linux 98.31% <100.00%> (+<0.01%) ⬆️
OS-Windows 96.15% <100.00%> (+<0.01%) ⬆️
OS-macOS 97.41% <100.00%> (+<0.01%) ⬆️
Py-3.10.11 97.26% <100.00%> (+<0.01%) ⬆️
Py-3.10.15 97.80% <100.00%> (+<0.01%) ⬆️
Py-3.11.10 97.85% <100.00%> (-0.05%) ⬇️
Py-3.11.9 97.31% <100.00%> (+<0.01%) ⬆️
Py-3.12.7 98.37% <100.00%> (+<0.01%) ⬆️
Py-3.13.0 98.37% <100.00%> (+<0.01%) ⬆️
Py-3.9.13 97.18% <100.00%> (-0.01%) ⬇️
Py-3.9.20 97.76% <100.00%> (+<0.01%) ⬆️
Py-pypy7.3.16 97.33% <100.00%> (+<0.01%) ⬆️
VM-macos 97.41% <100.00%> (+<0.01%) ⬆️
VM-ubuntu 98.31% <100.00%> (+<0.01%) ⬆️
VM-windows 96.15% <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.

Copy link

codspeed-hq bot commented Nov 26, 2024

CodSpeed Performance Report

Merging #10049 will not alter performance

Comparing skip_auto_headers_perf (047ab36) with master (c3c11a6)

Summary

✅ 44 untouched benchmarks

@bdraco bdraco added backport-3.11 Trigger automatic backporting to the 3.11 release branch by Patchback robot backport-3.12 Trigger automatic backporting to the 3.12 release branch by Patchback robot labels Nov 26, 2024
@bdraco bdraco changed the title DNM: Improve client performance when there are no auto headers to skip Improve client performance when there are no auto headers to skip Nov 26, 2024
@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Nov 26, 2024
@bdraco bdraco marked this pull request as ready for review November 26, 2024 22:48
@bdraco bdraco enabled auto-merge (squash) November 26, 2024 22:50
@bdraco bdraco merged commit 006fbc3 into master Nov 26, 2024
38 checks passed
@bdraco bdraco deleted the skip_auto_headers_perf branch November 26, 2024 22:51
Copy link
Contributor

patchback bot commented Nov 26, 2024

Backport to 3.11: 💚 backport PR created

✅ Backport PR branch: patchback/backports/3.11/006fbc376bf8eac9cbe54a902b09e1975bd1ff41/pr-10049

Backported as #10051

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Nov 26, 2024
Copy link
Contributor

patchback bot commented Nov 26, 2024

Backport to 3.12: 💚 backport PR created

✅ Backport PR branch: patchback/backports/3.12/006fbc376bf8eac9cbe54a902b09e1975bd1ff41/pr-10049

Backported as #10052

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

bdraco added a commit that referenced this pull request Nov 26, 2024
…here are no auto headers to skip (#10051)

Co-authored-by: J. Nick Koston <nick@koston.org>
bdraco added a commit that referenced this pull request Nov 26, 2024
…here are no auto headers to skip (#10052)

Co-authored-by: J. Nick Koston <nick@koston.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-3.11 Trigger automatic backporting to the 3.11 release branch by Patchback robot backport-3.12 Trigger automatic backporting to the 3.12 release branch by Patchback robot bot:chronographer:provided There is a change note present in this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant