-
Notifications
You must be signed in to change notification settings - Fork 98
Closed
Labels
Milestone
Description
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)