-
Enhancement
-
Resolution: Fixed
-
P4
-
7
-
b59
-
x86
-
windows_7
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8084637 | emb-9 | Daniel Fuchs | P4 | Resolved | Fixed | team |
A DESCRIPTION OF THE REQUEST :
private Hashtable<String,LoggerWeakRef> namedLoggers = new Hashtable<String,LoggerWeakRef>();
should be converted to:
private Map<String,LoggerWeakRef> namedLoggers = new ConcurrentHashMap<String,LoggerWeakRef>();
JUSTIFICATION :
It improves logging performance due to not having lock contention on retrieval.
Retrieving a logger happens way more often then adding a new logger.
already done in other java.lang.util.* classes:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6991380
also see:
http://www.ibm.com/developerworks/java/library/j-jtp07233/index.html#N101CD
http://www.codercorp.com/blog/java/why-concurrenthashmap-is-better-than-hashtable-and-just-as-good-hashmap.html
private Hashtable<String,LoggerWeakRef> namedLoggers = new Hashtable<String,LoggerWeakRef>();
should be converted to:
private Map<String,LoggerWeakRef> namedLoggers = new ConcurrentHashMap<String,LoggerWeakRef>();
JUSTIFICATION :
It improves logging performance due to not having lock contention on retrieval.
Retrieving a logger happens way more often then adding a new logger.
already done in other java.lang.util.* classes:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6991380
also see:
http://www.ibm.com/developerworks/java/library/j-jtp07233/index.html#N101CD
http://www.codercorp.com/blog/java/why-concurrenthashmap-is-better-than-hashtable-and-just-as-good-hashmap.html
- backported by
-
JDK-8084637 LogManager - namedLoggers should be ConcurrentHashMap instead of Hashtable
-
- Resolved
-
- relates to
-
JDK-8079773 java/util/logging/LogManager/TestLoggerNames.java
-
- Closed
-