sashapolo commented on a change in pull request #153:
URL: https://github.com/apache/ignite-3/pull/153#discussion_r643238623



##########
File path: 
modules/network-api/src/main/java/org/apache/ignite/network/serialization/MessageSerializationRegistry.java
##########
@@ -25,22 +27,29 @@
  */
 public class MessageSerializationRegistry {
     /** message type -> MessageSerializerProvider instance */
-    private final MessageSerializationFactory<?>[] factories = new 
MessageSerializationFactory<?>[Short.MAX_VALUE << 1];
+    private final Map<Integer, MessageSerializationFactory<?>> factories = new 
HashMap<>();

Review comment:
       It makes more sense in terms of read performance, but does it make sense 
in terms of occupied memory? What is the expected number of message groups? Are 
we ok to have an array size of 2^16 * 2^16 elements? Or should we instead 
restrict the maximum number of group types and enforce that all these types 
should be in order?  




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to