netty5/buffer/src
Nick Hill 5954110b9a Use ByteBufUtil.BYTE_ARRAYS ThreadLocal temporary arrays in more places (#8464)
Motivation:

#8388 introduced a reusable ThreadLocal<byte[]> for use in
decodeString(...). It can be used in more places in the buffer package
to avoid temporary allocations of small arrays.

Modifications:

Encapsulate use of the ThreadLocal in a static package-private
ByteBufUtil.threadLocalTempArray(int) method, and make use of it from a
handful of new places including ByteBufUtil.readBytes(...).

Result:

Fewer short-lived small byte array allocations.
2018-11-05 21:11:28 +01:00
..
main/java/io/netty/buffer Use ByteBufUtil.BYTE_ARRAYS ThreadLocal temporary arrays in more places (#8464) 2018-11-05 21:11:28 +01:00
test/java/io/netty/buffer Fix leak and corruption bugs in CompositeByteBuf (#8438) 2018-10-28 10:28:18 +01:00