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

Write bundling #2

Open
sshirokov opened this issue May 9, 2012 · 0 comments
Open

Write bundling #2

sshirokov opened this issue May 9, 2012 · 0 comments
Milestone

Comments

@sshirokov
Copy link
Owner

Right now the socket on-write callback writes a single buffer to the wire even when multiple writes are queued regardless of the size, this causes less than optimal write performance when many small writes are queued as it forces them to be written in several iterations of the event loop.

Ideally the on-write callback will bundle as many writes as it can into a fixed larger size buffer before attempting to write to get as much data across the wire as possible then fire any callbacks that should be fired as a result of the IO and update the offset in the last logical chunk that it tried and fail to write.

This change would force things like chunked HTTP replies to be written to the wire in larger chunks rather than several tiny writes without affecting the chain of callbacks that has an expectation of being invoked on write completion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant