Code inspection reveals three function calls per message that may be eliminated and a buffer free that could be executed outside of holding the content lock.
- Message allocator initializes object in memory ascending order
Despite the size of the code, setting the required fields to zero directly is faster that calling ZERO.
- Eliminate redundant calls to pn_link_get_context
- Free empty pending buffer outside of content lock