When the netty ByteBuf by a byte array.
N1qlQueryExecutor#executeQuery is allocating the byte array twice.
- the first time in TranscoderUtils#byteBufToByteArray
- the second with Arrays#copyOfRange
a specialized version of TranscoderUtils#byteBufToByteArray should be created that will only call Arrays#copyOfRange if the ByteBuf is backed by a byte array.
A hackish implementation tested in our environment reduced our n1ql memory allocation by 50% !
|For Gerrit Dashboard: JCBC-1098|
|82004,3||JCBC-1098 : N1qlQueryExecutor is allocating twice the memory it needs||master||couchbase-java-client||Status: MERGED||+2||+1|