sashapolo commented on code in PR #6412:
URL: https://github.com/apache/ignite-3/pull/6412#discussion_r2272294500


##########
modules/schema/src/main/java/org/apache/ignite/internal/schema/BinaryRowConverter.java:
##########
@@ -80,19 +80,22 @@ public void nextElement(int index, int begin, int end) {
             parser.fetch(columnIndex, stats);
         }
 
-        // Now compose the tuple.
-        BinaryTupleBuilder builder = new 
BinaryTupleBuilder(dstSchema.elementCount(), stats.estimatedValueSize);
+        var builder = new BinaryTupleBuilder(dstSchema.elementCount(), 
stats.estimatedValueSize);
+
+        Sink builderSink = (index, begin, end) -> {

Review Comment:
   > So the change is that builderSink is extracted to a variable. How does it 
help? It's still a lambda, and it still captures builder.
   
   The difference is that this lambda is no longer allocated inside a cycle.
   
   > I suggest replacing the lambda with an anonymous class.
   
   Why?
   
   > How about creating this class in a class field and reusing it with reset.
   
   After my changes the lambdas no longer appear in the JFRs, so their impact 
is miniscule. I don't want to make the code more complex for some ephemeral 
gains.



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to