JDK-6900779 : Use HashMap instead of Hashtable in CharInfo, Encodings, NamespaceMapping, XMLReaderManager
  • Type: Enhancement
  • Component: xml
  • Sub-Component: jaxp
  • Affected Version: 6u14p
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2009-11-12
  • Updated: 2012-06-08
  • Resolved: 2010-01-15
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.4.0 h1188Fixed
Description
The several xml workloads show the following uses of Hashtable as potential hot locks when running this workload on a system with a large number of hardware threads such as an UltraSPARC T2 system such as a Huron (single cpu socket w/ 64 hardware threads), Maramba (2 CPU sockets w/ 128 hardware threads) or Batoka system (4 CPU sockets w/ 256 hardware threads):
com/sun/org/apache/xml/internal/serializer/CharInfo.java
com/sun/org/apache/xml/internal/serializer/Encodings.java
com/sun/org/apache/xml/internal/serializer/NamespaceMappings.java
com/sun/org/apache/xml/internal/utils/XMLReaderManager.java

If the uses of Hashtable cannot be replaced with unsynchronized HashMap, then we might consider replacing them with ConcurrentHashMap.

There are two attachments which contain the modifications described here in both a "diff patch" form and full source code form.  The source base used for these files were the jaxp sources from java.net, the head branch.

Comments
EVALUATION ChangeSet=http://hg.openjdk.java.net/jdk6/jdk6/jaxp/rev/5c070921580c,ChangeRequest=6923146,ChangeRequest=6917454,ChangeRequest=6472982,ChangeRequest=6909759,ChangeRequest=6333993,ChangeRequest=6900779,ChangeRequest=6900773,ChangeRequest=6900249,ChangeRequest=6675332,ChangeRequest=6889654,ChangeRequest=6889649,ChangeRequest=6863312
2010-02-18

EVALUATION Performance improvement.
2009-11-30