-
-
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
Restore zero copy writes on Python 3.12.9+/3.13.2+ #10137
base: master
Are you sure you want to change the base?
Conversation
CodSpeed Performance ReportMerging #10137 will not alter performanceComparing Summary
|
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 97.18% 98.75% +1.56%
==========================================
Files 120 122 +2
Lines 36888 37031 +143
Branches 4301 4432 +131
==========================================
+ Hits 35851 36571 +720
+ Misses 824 313 -511
+ Partials 213 147 -66
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
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