Skip to content

Write bundling #2

@sshirokov

Description

@sshirokov

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions