You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2021/11/29 05:47:50 UTC

[GitHub] [rocketmq] XiaoyiPeng commented on issue #3533: It is better to specify the initialCapacity when initializing a HashMap as a local variable that will not add elements in the future

XiaoyiPeng commented on issue #3533:
URL: https://github.com/apache/rocketmq/issues/3533#issuecomment-981310792


   > some advices. If there are for four elements ,the capacity should be larger than four to prevent expansion
   
   Use the style of the previous code(like` org.apache.rocketmq.broker.filter.MessageEvaluationContext#keyValues()` ), the `loadFactor` of `HashMap` has been set to 1 and will not be expanded.


-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org