tkalkirill commented on code in PR #4689: URL: https://github.com/apache/ignite-3/pull/4689#discussion_r1833777378
########## 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; Review Comment: Doesn't concern your changes, this is not the first time we've used a lazy list, it's probably time to create a class for it. ########## 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: Is it possible to change to a counting cycle? ########## modules/network/src/main/java/org/apache/ignite/internal/network/netty/OutboundEncoder.java: ########## @@ -119,20 +125,20 @@ private NetworkMessageChunkedInput( /** {@inheritDoc} */ Review Comment: Maybe we should get rid of useless comments? -- 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