Skip to content

Reduce message overhead #28

@edsko

Description

@edsko

Small CH messages have a large overhead. For instance, consider sending (Nothing :: Maybe ProcessId). The binary encoding of Nothing is one byte, but the total message sent looks like

<channel ID>                4 bytes
<message length>            4 bytes
<message type fingerprint>  16 bytes
<payload>                   1 byte

For an overhead of 2400% :) Obvious ways to reduce the overhead are

  • Use a single byte for the first 255 connection IDs
  • Use a single byte for message length <= 255
  • Use a single byte to index into some cache for commonly used fingerprints (since most applications will probably send only a handful of different types of messages across the network, this might be very effective)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions