United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6900779 Use HashMap instead of Hashtable in CharInfo, Encodings, NamespaceMapping, XMLReaderManager
JDK-6900779 : Use HashMap instead of Hashtable in CharInfo, Encodings, NamespaceMapping, XMLReaderManager

Details
Type:
Enhancement
Submit Date:
2009-11-12
Status:
Closed
Updated Date:
2012-06-08
Project Name:
JDK
Resolved Date:
2010-01-15
Component:
xml
OS:
generic
Sub-Component:
jaxp
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
6u14p
Fixed Versions:
1.4.0 (h1188)

Related Reports

Sub Tasks

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

Performance improvement.
                                     
2009-11-30
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



Hardware and Software, Engineered to Work Together