netty5/codec/src
Nick Hill 019cdca40b 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 14:01:30 +01:00
..
main/java/io/netty/handler/codec Other ByteToMessageDecoder streamlining (#9891) 2019-12-23 14:01:30 +01:00
test Other ByteToMessageDecoder streamlining (#9891) 2019-12-23 14:01:30 +01:00