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

Disable the file canonicalization cache by default

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 12
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      master

      Description

      The file canonicalization cache was added back in JDK 1.4.2 in order to improve startup time.

      The cache has long-standing correctness issues (JDK-7066948, for example). For this reason, it has been desired to disable the cache by default, but the increase to startup time was undesirable.

      Recent JDK releases have removed usages of the cache, in particular from FilePermission (JDK-8164705 in JDK 9). This reduced usage of the canonicalization cache should also reduce the startup effect of disabling the cache by default. Measurements support this. Previous measurements showed the startup effect of disabling the cache on Linux to be 3-6%, depending on the specific benchmark. The same comparison performed last month now show no startup change on Linux.
       
      The file canonicalization cache can still be enabled by setting the "sun.io.useCanonCaches" system property. This is merely a change to the default value.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                bchristi Brent Christian
                Reporter:
                bchristi Brent Christian
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: