Details
-
Type:
Improvement
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.10.0
-
Fix Version/s: 2.11.0
-
Component/s: None
-
Labels:None
Description
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().getIntegerPropertyPROPERTY_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.
Attachments
Issue Links
- is related to
-
LOG4J2-2213 Unnecessary contention in GarbageFreeSortedArrayThreadContextMap
-
- Closed
-
-
LOG4J2-2214 Unnecessary contention in DefaultThreadContextMap.
-
- Closed
-