You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2021/10/10 17:52:29 UTC
[GitHub] [iceberg] rdblue commented on a change in pull request #3260: Reduce Excessive Build Logs - Fix ErrorProne AvoidNewHashMapInt which adds perf gains
rdblue commented on a change in pull request #3260:
URL: https://github.com/apache/iceberg/pull/3260#discussion_r725674307
##########
File path: api/src/main/java/org/apache/iceberg/Metrics.java
##########
@@ -230,7 +230,7 @@ private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundE
return null;
} else {
- Map<Integer, ByteBuffer> result = new HashMap<>(size);
+ Map<Integer, ByteBuffer> result = Maps.newHashMapWithExpectedSize(size);
Review comment:
+1 This is one of the reasons why we prefer using factory methods in `Maps`.
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org