netty5/buffer
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
..
src Use ByteBufUtil.BYTE_ARRAYS ThreadLocal temporary arrays in more places (#8464) 2018-11-05 21:11:28 +01:00
pom.xml [maven-release-plugin] prepare for next development iteration 2018-10-29 15:38:51 +00:00