019cdca40b
Motivation This PR is a reduced-scope replacement for #8931. It doesn't include the changes related to how/when discarding read bytes is done, which we plan to address in subsequent updates. Modifications - Avoid copying bytes in COMPOSITE_CUMULATOR in all cases, performing a shallow copy where necessary; also guard against (unusual) case where input buffer is composite with writer index != capacity - Ensure we don't pass a non-contiguous buffer when MERGE_CUMULATOR is used - Manually inline some calls to ByteBuf#writeBytes(...) to eliminate redundant checks and reduce stack depth Also includes prior minor review comments from @trustin Result More correct handling of merge/composite cases and more efficient handling of composite case. |
||
---|---|---|
.. | ||
src | ||
pom.xml |