-
-
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
Switch WebSocketWriter to use removesuffix
to drop compression trailer
#9795
Conversation
CodSpeed Performance ReportMerging #9795 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 #9795 +/- ##
=======================================
Coverage 98.69% 98.69%
=======================================
Files 118 118
Lines 36007 36004 -3
Branches 4281 4280 -1
=======================================
- Hits 35536 35534 -2
Misses 316 316
+ Partials 155 154 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
We have no benchmark for compression. We need to add that before considering this change |
Now that Python 3.8 is no longer supported we can use removesuffix
02c1027
to
3c6d870
Compare
removesuffix
removesuffix
removesuffix
to drop compression trailer
Backport to 3.11: 💚 backport PR created✅ Backport PR branch: Backported as #9805 🤖 @patchback |
(cherry picked from commit fcb790b)
…ovesuffix` to drop compression trailer (#9805) Co-authored-by: J. Nick Koston <[email protected]>
Now that Python 3.8 is no longer supported (
master
and3.11
only) we can usebytes.removesuffix
This also takes care of one uncovered branch in the tests and brings the
WebSocketWriter
up to 100% line/branch coverageIts small improvement, considering how much time the compression actually takes. It will be >10% if using
isal
for compression though since the compression overhead is far less when using alternativezlib
see #9798