-
-
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
Implement zero copy writes for the WebSocket writer #9634
Conversation
CodSpeed Performance ReportMerging #9634 will degrade performances by 16.77%Comparing Summary
Benchmarks breakdown
|
❌ 6 Tests Failed:
View the top 3 failed tests by shortest run time
To view individual test run time comparison to the main branch, go to the Test Analytics Dashboard |
Benchmarks barely show any improvement. I think the message payload would have to be rather large for it to matter. We don't have any benchmarks for that |
Still probably not a good benchmark. Will need to extend the round trip WebSocket benchmark to have another one that sends large messages to really get an idea of how it will perform |
Its looking like this is worse because the reader is more fragmented. Probably worth optimizing the reading of larger messages before this would make sense |
Nevermind. I was misremembering. It’s reads that get paused which makes more sense |
Anyways. Let’s see what the profile looks like with now with all the memcpy reduction optimizations |
We still end up with more fragmentation somehow. Probably need to work on the reader some more |
need to look at this with syscalls |
Implement zero copy writes for the WebSocket writer
closes #9633
python/cpython#91166 made
writelines
zero copy for Python 3.12+. For older versions it will still join the bytesWould like another set of 👀 on this to make sure it makes sense.