Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
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
Activity
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 ] |
See https://github.com/couchbase/couchbase-java-client/pull/21