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 #10073/349b7565 backport][3.11] Improve performance of parsing headers #10083

Conversation

patchback[bot]
Copy link
Contributor

@patchback patchback bot commented Dec 1, 2024

This is a backport of PR #10073 as merged into master (349b756).

After we have a complete header we always have to convert it to a new bytes object. For almost every case we get the header in a single read. In this case its much faster to convert to bytes once. If the header gets split across multiple reads it will be a bit slower but this is the uncommon case.

Screenshot 2024-12-01 at 3 13 50 PM

@bdraco bdraco enabled auto-merge (squash) December 1, 2024 21:27
Copy link

codspeed-hq bot commented Dec 1, 2024

CodSpeed Performance Report

Merging #10083 will not alter performance

Comparing patchback/backports/3.11/349b756592bd9baee4ef89e2ed9a770b2800cce5/pr-10073 (f7eff6f) with 3.11 (8b08c9e)

Summary

✅ 44 untouched benchmarks

Copy link

codecov bot commented Dec 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.06%. Comparing base (8b08c9e) to head (f7eff6f).
Report is 2 commits behind head on 3.11.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             3.11   #10083   +/-   ##
=======================================
  Coverage   98.06%   98.06%           
=======================================
  Files         122      122           
  Lines       37045    37045           
  Branches     4453     4453           
=======================================
  Hits        36328    36328           
  Misses        540      540           
  Partials      177      177           
Flag Coverage Δ
CI-GHA 97.95% <ø> (ø)
OS-Linux 97.66% <ø> (ø)
OS-Windows 94.57% <ø> (ø)
OS-macOS 96.77% <ø> (ø)
Py-3.10.11 96.63% <ø> (ø)
Py-3.10.15 97.22% <ø> (+0.04%) ⬆️
Py-3.11.10 97.24% <ø> (ø)
Py-3.11.9 96.71% <ø> (+<0.01%) ⬆️
Py-3.12.7 97.73% <ø> (ø)
Py-3.13.0 97.72% <ø> (ø)
Py-3.9.13 96.56% <ø> (ø)
Py-3.9.20 97.13% <ø> (-0.01%) ⬇️
Py-pypy7.3.16 96.70% <ø> (ø)
VM-macos 96.77% <ø> (ø)
VM-ubuntu 97.66% <ø> (ø)
VM-windows 94.57% <ø> (ø)

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 9df00a1 into 3.11 Dec 1, 2024
34 checks passed
@bdraco bdraco deleted the patchback/backports/3.11/349b756592bd9baee4ef89e2ed9a770b2800cce5/pr-10073 branch December 1, 2024 21:55
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