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

Classfile API performance improvements

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 21
    • None
    • core-libs

      Some of the performance sensitive components of Classfile API can be improved:
      - Switch over `String` patterns can be replaced with switch over single char in some case to prevent calculation of `String` hash.
      - `ClassDesc` and `MethodTypeDesc` symbols can be cached and shared inside relevant CP entries to prevent repeated construction and validation of the symbols.
      - `StackMapGenerator` can benefit from the cached symbols to prevent repeated construction and validation of the symbols.
      - `StackMapGenerator::getFrameIndexFromOffset` can use binary search for improved performance
      - `StackMapGenerator.exceptionTable` can pre-calculate offsets to avoid repeated labels resolutions.
      - `StackMapGenerator::processExceptionHandlerTargets` can skip execution for try block bodies when unchanged locals.

            asotona Adam Sotona
            asotona Adam Sotona
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: