-
-
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
Avoid multiple slice calls in the WebSocket reader #9636
Conversation
CodSpeed Performance ReportMerging #9636 will improve performances by 15.71%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 #9636 +/- ##
==========================================
- Coverage 98.64% 98.64% -0.01%
==========================================
Files 114 114
Lines 35361 35360 -1
Branches 4191 4191
==========================================
- Hits 34882 34881 -1
Misses 321 321
Partials 158 158
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Backport to 3.10: 💔 cherry-picking failed — conflicts found❌ Failed to cleanly apply 42a69af on top of patchback/backports/3.10/42a69afc99d94f0aae8f4de69f17cd7332f58ff0/pr-9636 Backporting merged PR #9636 into master
🤖 @patchback |
Backport to 3.11: 💚 backport PR created✅ Backport PR branch: Backported as #9637 🤖 @patchback |
(cherry picked from commit 42a69af)
…WebSocket reader (#9637) Co-authored-by: J. Nick Koston <[email protected]>
Avoids
PySequence_GetSlice(__pyx_v_buf, __pyx_v_start_pos, PY_SSIZE_T_MAX);
in most cases when there is no tailAvoids
PySequence_GetSlice(__pyx_v_buf, __pyx_v_start_pos, (__pyx_v_start_pos + 2));
to copybuf
todata
sincedata
is only used to unpack 2 bytes, and we already know where they are inbuf