Skip to content
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 zerocopy writes for the encrypted protocol #385

Merged
merged 8 commits into from
Nov 1, 2024
Merged

Conversation

bdraco
Copy link
Collaborator

@bdraco bdraco commented Nov 1, 2024

With Python 3.12+ and later transport.writelines is implemented as sendmsg(..., IOV_MAX) which allows us to avoid joining the bytes and sending them in one go.

Older Python will effectively do the same thing we do now b"".join(...)

With Python 3.12+ and later `transport.writelines` is implemented as [`sendmsg(..., IOV_MAX)`](python/cpython#91166) which allows us to avoid joining the bytes and sending them in one go.

Older Python will effectively do the same thing we do now `b"".join(...)`
@bdraco bdraco marked this pull request as ready for review November 1, 2024 14:33
Copy link
Owner

@Jc2k Jc2k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one!

@bdraco bdraco merged commit 13b8283 into main Nov 1, 2024
10 checks passed
@bdraco bdraco deleted the zero_copy_write branch November 1, 2024 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants