tkalkirill commented on code in PR #4689:
URL: https://github.com/apache/ignite-3/pull/4689#discussion_r1833826339


##########
modules/network/src/main/java/org/apache/ignite/internal/network/netty/OutboundEncoder.java:
##########
@@ -98,11 +98,17 @@ private NetworkMessageChunkedInput(
             this.serializationService = serializationService;
             this.msg = outObject.networkMessage();
 
-            List<ClassDescriptorMessage> outDescriptors = 
outObject.descriptors().stream()
-                    .filter(classDescriptorMessage -> 
!serializationService.isDescriptorSent(classDescriptorMessage.descriptorId()))
-                    .collect(Collectors.toList());
+            List<ClassDescriptorMessage> outDescriptors = null;
+            for (ClassDescriptorMessage classDescriptorMessage : 
outObject.descriptors()) {

Review Comment:
   I'll assume that it is being created but it's just not visible. Your ticket 
is about optimization, let's do it to the maximum, the counting loop in this 
case will make 1 line of code more, which will not lose the readability of the 
code.



-- 
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