netty5/codec
Nick Hill 1d22fbd78c Other ByteToMessageDecoder streamlining (#9891)
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.
2019-12-23 08:54:31 +01:00
..
src Other ByteToMessageDecoder streamlining (#9891) 2019-12-23 08:54:31 +01:00
pom.xml [maven-release-plugin] prepare for next development iteration 2019-12-18 08:32:54 +00:00