-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Restore zero copy writes on Python 3.12.9+/3.13.2+ #10137
Conversation
CodSpeed Performance ReportMerging #10137 will improve performances by 18.02%Comparing Summary
Benchmarks breakdown
|
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 #10137 +/- ##
==========================================
- Coverage 98.76% 98.76% -0.01%
==========================================
Files 122 122
Lines 37048 37123 +75
Branches 2042 2044 +2
==========================================
+ Hits 36590 36664 +74
- Misses 318 319 +1
Partials 140 140
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
CVE-2024-12254 aka GHSA-fw89-6wjj-8j95 is fixed on these Python versions
Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]>
894af34
to
85b21f7
Compare
as soon as actions/python-versions#331 merges we can re-run |
It's merged! |
Looks like we are still getting 3.13.1
|
There we go Merging #10137 will improve performances by 18.02% |
Backport to 3.11: 💔 cherry-picking failed — conflicts found❌ Failed to cleanly apply 25c7f23 on top of patchback/backports/3.11/25c7f2382be9b5e03b8d22671f36a2f6fb07221a/pr-10137 Backporting merged PR #10137 into master
🤖 @patchback |
Backport to 3.12: 💔 cherry-picking failed — conflicts found❌ Failed to cleanly apply 25c7f23 on top of patchback/backports/3.12/25c7f2382be9b5e03b8d22671f36a2f6fb07221a/pr-10137 Backporting merged PR #10137 into master
🤖 @patchback |
Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]> (cherry picked from commit 25c7f23)
Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]> (cherry picked from commit 25c7f23)
TODO
What do these changes do?
Restore zero copy support on Python 3.12.9+/3.13.2+ (unreleased at this time)
CVE-2024-12254 aka GHSA-fw89-6wjj-8j95 is fixed on these Python versions
Are there changes in behavior for the user?
The performance regression introduced by disabling zero copy writes in #10125 will be resolved
The relevant benchmarks (keep in mind we are benchmarking disabling zero copy writes), and this PR seeks to restore the performance:
test_one_hundred_get_requests_with_1024_chunked_payload
+3% (writelines
is a bit worse for tiny payloads)test_one_hundred_get_requests_with_512kib_chunked_payload
-21% (writelines
is a lot better for large payloads)test_one_hundred_get_requests_with_30000_chunked_payload
-4% (writelines
is a slightly better for medium size payloads)Since we already have to branch here, I also added
MIN_PAYLOAD_FOR_WRITELINES
to 2048 to ensure we no longer take the 3% performance hit forwritelines
with small payloads