michaelsembwever commented on code in PR #3761:
URL: https://github.com/apache/cassandra/pull/3761#discussion_r1910150593
##########
src/java/org/apache/cassandra/cql3/restrictions/PartitionKeySingleRestrictionSet.java:
##########
@@ -98,6 +106,11 @@ public List<ByteBuffer> values(QueryOptions options,
ClientState state)
if (builder.hasMissingElements())
break;
}
+ // memory allocation optimization: to avoid BTreeSet, iterators
allocation and use cheaper collections
+ // we handle a single clustering explicitly (we frequently modify a
single row)
+ if (builder.buildSize() <= 1) {
+ return toByteBuffers(builder.buildSingle());
+ }
Review Comment:
```suggestion
if (builder.buildSize() <= 1)
return toByteBuffers(builder.buildSingle());
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]