Skip to content

Add a set of functions to broadcast efficiently #73

@tarasko

Description

@tarasko

Currently, every client will prepare its own frame and (in some cases) copy its content into a new bytes object before passing it to the loop Transport.write.
See example

Instead, the library could use the first client write buffer to prepare frame and make a necessary bytes object only once. Then pass it to the transport layer of all clients.

This way we eliminate memcpy in some cases twice per client. With big message sizes memcpy costs are very expensive, such optimization will give a decent boost.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions