Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8086045 Improve the java.lang.invoke first initialization costs
  3. JDK-8163370

Reduce number of classes loaded by common usage of java.lang.invoke

    XMLWordPrintable

Details

    • Sub-task
    • Resolution: Fixed
    • P4
    • 9
    • None
    • core-libs

    Description

      Various code constructs in java.lang.invoke pull in an excessive amount of classes early during bootstrap. Some non-intrusive refactorings can reduce the number of classes we depend on and load early.

      Examples:

      - Using an EnumMap<Wrapper, MethodHandle> in sun.misc.invoke.ValueConversions pulls in 5 EnumMap-related classes. Additionally calling values() on an enum class to get the number of enum creates and loads an array class and cause a clone to be allocated every time, which is detrimental to startup performance.
      - Using result.addAll(Arrays.asList(buf).subList(0, bufCount)) rather than a simple for-loop pulls in 5 classes

      Attachments

        Activity

          People

            redestad Claes Redestad
            redestad Claes Redestad
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: