This commit results in great performance improvements for AMQP 1.0.
Stream filtering via AMQP SQL Filters or AMQP Property Filters where the
broker reads messages from the stream into memory and the filter returns
false, i.e. messages are not sent to the client:
Before this commit: ~400,000 msgs/s
After this commit: ~500,000 msgs/s
There is also a ~10% increase in end-to-end throughput for normal
AMQP workloads, e.g. when sending to and receiving from a classic queue.
Prior to this commit, a lot of garbage was created leading to many minor
garbage collections.
This commit reduces the garbage being generated.
The new module amqp10_composite performs very well:
* Single tuple update setting multiple fields at once, sometimes done even in-place
without copying the tuple.
* The list of fields is passed into X registers, no need for any new
allocations.
On the serialisation side, this commit also generates less garbage by:
1. Avoiding tuple_to_list/1
2. Omitting trailing elements of the list that are null
This will also lead to fewer bytes per message sent on the wire and less
resource usage for the clients as they need to parse fewer fields.