vy commented on a change in pull request #544: URL: https://github.com/apache/logging-log4j2/pull/544#discussion_r665949982
########## File path: log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/NamePatternConverter.java ########## @@ -29,6 +32,11 @@ */ private final NameAbbreviator abbreviator; + /** + * Cache of previously encountered inputs (keys) and conversion results (values). + */ + private final Map<String, String> conversionCache = new ConcurrentHashMap<>(); Review comment: @carterkozak, I totally agree with your remarks on the shortcomings of introducing a caching layer. Do you have any suggestions on how to improve the performance of the existing abbreviator? This said, @sman-81's caching hack (with a bounded size) seems like a low hanging fruit to me. We need to introduce a property where one can change the default size. Further, shall we use a `CHM` or a `ReadWriteLock`-protected `HM`? -- 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