4 ms·
> Messages are always copied before being inserted into the queue. As wasteful as this may sound it greatly reduces garbage collection (GC) latency as the GC ne
by amelius 6y ago
> Messages are always copied before being inserted into the queue. As wasteful as this may sound it greatly reduces garbage collection (GC) latency as the GC never has to look beyond a single process.
This means there is no structural sharing, which can be troublesome with huge data structures. (Edit: not entirely true, see comments below)
- srijan4 6y agoThe only sharing is for large binaries (>64 bytes)[0]. Like all messaging mechanisms, this can be handled by passing a reference or id, and the receiver fetching the actual large data from db/file/source of truth. [0] - http://erlang.2086793.n4.nabble.com/how-message-size-effects-performance-td2112663.html http://erlang.2086793.n4.nabble.com/how-message-size-effects...
- amelius 6y ago> The only sharing is for large binaries Can you also share small objects by reference? (I.e. prevent serialization of a large tree composed of small objects) And refer to those objects through pointers (avoiding an expensive db layer)?