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% !
|Field||Original Value||New Value|
|Status||New [ 10003 ]||Open [ 1 ]|
|Fix Version/s||2.5.0 [ 14200 ]|
|Resolution||Fixed [ 1 ]|
|Status||Open [ 1 ]||Resolved [ 5 ]|
|Workflow||Couchbase SDK Workflow [ 86924 ]||Couchbase SDK Workflow with Review [ 252625 ]|