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

SocketPermission constructor has gotten much slower

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.4.0
    • core-libs
    • None
    • beta
    • generic
    • generic

      new SocketPermission("foo", actions) has gotten much slower compared with 1.3. The culprit seems to be the calls to Inet6Address.textToNumericFormat and Inet4Address.textToNumericFormat. Both of these methods call String.getBytes() and cons up another byte[] array, even if the src string is not numeric. String.getBytes() in particular seems quite expensive, and appears to be the main cause of the slowdown. For the normal case, it appears that it would be much faster to use String.charAt.

            ywangsunw Yingxian Wang (Inactive)
            bscheiflsunw Bob Scheifler (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: