Details

    • Type: Enhancement
    • Status: New
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
      None

      Description

      Causing early reads of property files has been a recurring source of startup regressions, e.g., when a read of java.security.Security has happened earlier. A number of optimizations has been put in place to soften the blow when it happens, and avoid the cost altogether in common cases. Still reading in property files like java.security and net.properties is cause for measurable overhead on a number of apps.

      Most of these property files can be effectively archived into CDS, which means we can elide reading of the property file altogether if it's not been modified since the CDS archive was created. In a prototype applying this idea for java.security, we reduce the overhead by 90%:

          long before = System.nanoTime();
          String f = java.security.Security.getProperty("foo");
          long after = System.nanoTime();

      after - before:
      baseline: 3886178ns
      PoC[1]: 329022ns

      [1] http://cr.openjdk.java.net/~redestad/scratch/java.security.archive.00/

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated: