kilink commented on PR #3868:
URL: https://github.com/apache/logging-log4j2/pull/3868#issuecomment-3156023602

   > Did you observe a particular performance issue?
   
   I don't recall how I stumbled upon it or if it showed up in any performance 
profiles (it definitely has for other libraries). It's just a common thing I've 
noticed across various projects (e.g., spring and grpc-java) since the HashMap 
constructor is a foot gun and it's not easy to do correctly until Java 19. 
Since the intent here was to presize the map, and we know how many elements to 
insert, it just seemed to make sense to size it so we always avoid the resize / 
rehash operations.


-- 
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...@logging.apache.org

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

Reply via email to