Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6900779

Use HashMap instead of Hashtable in CharInfo, Encodings, NamespaceMapping, XMLReaderManager

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.4.0
    • 6u14p
    • xml
    • h1188
    • generic
    • generic
    • Verified

      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.

            joehw Joe Wang
            huntch Charlie Hunt
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: