Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.10.0
-
None
-
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
Attachments
Issue Links
- is related to
-
LOG4J2-2213 Unnecessary contention in GarbageFreeSortedArrayThreadContextMap
- Closed
-
LOG4J2-2214 Unnecessary contention in DefaultThreadContextMap.
- Closed