Skip to content

cpu load by prepare_uninitialized_buffer in async_read of tokio-io #269

Closed
@gin66

Description

@gin66

The current implementation zeros out a buffer, which consumes a lot of time. In my application the CPU actually spends 86% in this routine, which only listens to a tls web socket stream. The traffic is not high (10-100 kB/s), but this buffer zeroing has a huge hit on the application performance.

The application makes use of the websocket crate, which imports tokio-io. It uses the framed interface, so the application has no direct access. Possibly there could be some (complex) solution be implemented to solve this problem. Best would be to add a feature-flag, which decides about zero out the buffer or not.

Any other solution ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions