Details
-
Improvement
-
Resolution: Fixed
-
Minor
-
2.4.7
-
java 8
Description
When the netty ByteBuf is not backed 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% !
Attachments
For Gerrit Dashboard: JCBC-1098 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
82004,3 | JCBC-1098 : N1qlQueryExecutor is allocating twice the memory it needs | master | couchbase-java-client | Status: MERGED | +2 | +1 |