[ 
https://issues.apache.org/jira/browse/LOG4J2-2212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16336419#comment-16336419
 ] 

ASF subversion and git services commented on LOG4J2-2212:
---------------------------------------------------------

Commit 7fea56d5e85086bef95f9f3b10066917b09c5ec4 in logging-log4j2's branch 
refs/heads/master from [~garydgregory]
[ https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;h=7fea56d ]

[LOG4J2-2212]Unnecessary contention in
CopyOnWriteSortedArrayThreadContextMap.
[LOG4J2-2213] Unnecessary contention in
GarbageFreeSortedArrayThreadContextMap. Oops, forgot to remove old call.

> Unnecessary contention in CopyOnWriteSortedArrayThreadContextMap
> ----------------------------------------------------------------
>
>                 Key: LOG4J2-2212
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-2212
>             Project: Log4j 2
>          Issue Type: Improvement
>    Affects Versions: 2.10.0
>            Reporter: Daniel Feist
>            Assignee: Gary Gregory
>            Priority: Major
>             Fix For: 2.11.0
>
>         Attachments: Screen Shot 2018-01-23 at 14.23.33.png
>
>
> The following method retrieves the value of a system property for each and 
> every map that is created.  While maps are cached/reused where possible via 
> thread local this method is still used a lot in runtime.
> {{protected StringMap createStringMap() {}}
> {{  return new 
> SortedArrayStringMap(PropertiesUtil.getProperties().getIntegerProperty}}{{PROPERTY_NAME_INITIAL_CAPACITY,
>  DEFAULT_INITIAL_CAPACITY));}}
> {{}}}
> Under concurrency, this introduces unnecessary contention due to 
> java.util.Properties monitor in HashTable.contains when retrieving system 
> property, as seen below.
> !Screen Shot 2018-01-23 at 14.23.33.png! 
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to