Vladsz83 commented on code in PR #13140:
URL: https://github.com/apache/ignite/pull/13140#discussion_r3279205650


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/PartitionUpdateCountersMessage.java:
##########
@@ -158,10 +171,9 @@ private void ensureSpace(int newSize) {
         int req = newSize * ITEM_SIZE;
 
         if (data.length < req)
-            data = Arrays.copyOf(data, data.length << 1);
+            data = Arrays.copyOf(data, (int)(data.length * 1.33f));

Review Comment:
   There is no quarantine of invoking _finishUpdating()_. We lack a message 
finalization life cycle (not _prepareMarshall()_). If wasn't 
finished/optimized, less memory would wasted. Also, growing with factor of 1.3 
or 1.5 is a common practice too. x2 looks too sweeping.



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

Reply via email to