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

Improve initial setup of system Properties

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 12
    • 12
    • core-libs
    • b24

        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.

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

                Created:
                Updated:
                Resolved: