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

Concatenate small buffers #2163

Closed
wants to merge 1 commit into from
Closed

Concatenate small buffers #2163

wants to merge 1 commit into from

Conversation

lpinca
Copy link
Member

@lpinca lpinca commented Aug 21, 2023

Make Sender.frame() always return a single buffer if the payload length is less than 126 bytes. This is done by copying the data but for small buffers it is more efficient than using socket._writev().

Make `Sender.frame()` always return a single buffer if the payload
length is less than 126 bytes. This is done by copying the data but
for small buffers it is more efficient than using `socket._writev()`.
@lpinca
Copy link
Member Author

lpinca commented Sep 6, 2023

As expected, the speedup decreases as the number of clients grow, so I am not sure if it is worth it.

@lpinca lpinca closed this Dec 26, 2023
@lpinca lpinca deleted the concatenate/small-buffers branch December 26, 2023 15:34
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.

None yet

3 participants