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

Improve initial setup of system Properties

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 12
    • Fix Version/s: 12
    • Component/s: core-libs
    • Subcomponent:
    • Resolved In Build:
      b24

      Backports

        Description

        In the current implementation, we create a Properties object, then iterate over that to create a map that we store away internally (VM.savedProperties), then we remove a few internal properties from the properties object.

        By first creating the HashMap we achieve two things:
         1) iterating over a HashMap.entrySet() is cheaper than iterating over CHM.entrySet() (less allocations, fewer classes loaded in a sensitive bootstrap phase)
         2) we avoid the overhead of first adding then filtering out the properties we don't want to publish

        All in all a small but measurable startup gain.

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  Created:
                  Updated:
                  Resolved: