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

Reduce the RecompilableScriptFunctionData footprint

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b31
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        RecompilableScriptFunctionData instances have gotten pretty big. There are some opportunities for reducing their footprint:

        - most functions have empty nestedFunctions. Canonicalizing them with Collections.emptyMap() would help.
        - most functions have empty internalSymbols. Canonicalizing them with Collections.emptySet() would help.
        - most functions (those that don't set any this.* properties) will have the same allocatorClassName (JO4, currently) and an empty allocatorMap. By extracting the tuple of (allocatorClassName, allocatorMap, allocator) into a separate small AllocatorStrategy class and keeping a canonical DEFAULT_STRATEGY instance around for representing allocator strategy for functions that don't initialize any this.* properties, we could eliminate 2 fields, and reduce the number of class names and empty property maps around.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                attila Attila Szegedi
                Reporter:
                attila Attila Szegedi
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: