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

Large Allocation in CipherSuite

XMLWordPrintable

    • b08
    • generic
    • generic

        We have identified large number of allocations in CipherSuites[1]. The root cause for the allocations is that in the `CipherSuite.values` call in `nameof` and `valueof` functions. These functions are called by the SSLAlgorithmDecomposer and in SSLEngineImpl. The enumeration values functions clones the array before returning. A previous discussion on the compiler-dev channel[2] describes why the values function returns a clone. We would like to propose that the CipherSuite.values be stored in a `private static final` field. This would prevent the need to clone the array for each lookup across the enum.

        1 : https://github.com/openjdk/jdk/blob/master/src/java.base/share/classes/sun/security/ssl/CipherSuite.java
        2 : http://mail.openjdk.java.net/pipermail/compiler-dev/2018-July/012242.html

              cverghese Clive Verghese
              cverghese Clive Verghese
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: