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

[Nor] significant slowdown in Java 1.5's JCK harness: sun.text.Normalizer

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 6
    • 5.0
    • core-libs
    • b42
    • generic
    • generic

      I've noticed a significant slowdown in the JCK harness for Java
      1.5 as compared to Java 1.4. This is when indexing tests. I've
      traced it to the following location:

      sun.text.Normalizer

      This class contains a method called "next" in Java 1.5, which starts
      by allocating arrays, one char[100] and one int[1]. Most of the calls
      the JCK does to this method return before these arrays are used at
      all, resulting in the garbage collection of many, many heaps full of
      empty freshly allocated arrays. A great waste. Just moving these
      allocations down to the call where they are sent as in parameters
      reduces memory overhead significantly. This should maybe be treated
      as a bug/problem in Java 1.5, since it's very uneconomic. The same
      pattern appears in the "previous" method of the same class.

            peytoia Yuka Kamiya (Inactive)
            clucasius Carlos Lucasius (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: