The environment :
- couchbase server 4.6
- java client
on the same machine (dev), plenty of ram, SSD disk, 4 cores
Simple bucket with only 2 (heavy) documents.
Simple query select b.* FROM thebucket b
Execute the query in the couchbase admin : 120 ms
the same query with the java client : 12 seconds
the thread doing the computation is using a core at 100%
the document is huge and badly designed
the performances should be nearly the same between java and the admin console.
After investigation the performance bottleneck is in QueryHandler#parseQueryRows > ByteBufJsonHelper#findSectionClosingPosition
Looks like data in being appended to a buffer but the scan with forEachByte is always done from the beginning of the buffer.
|For Gerrit Dashboard: JVMCBC-446|
|82054,7||JVMCBC-446: Speed up end of row parsing for N1QL parser.||master||couchbase-jvm-core||Status: MERGED||+2||+1|