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

Improve handling of JarFile META-INF resources

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 15
    • Component/s: core-libs

      Description

      Currently during ZipFile creation, we create an int[] array of pointers to META-INF entries. These are then retrieved from three different places in JarFile.

      However, JarFile is only interested in some combination a few things: The existence of and name of the META-INF/MANIFEST file, and the existence of and, potentially, the names of various signature related files, i.e., files in META-INF that have a suffix such as .EC, .SF, .RSA and .DSA

      Refactoring the contract between JarFile and ZipFile means we can filter out early such files that we're not interested in to begin with, and remove the need to create the String for such entries unless we actually need them.

      http://cr.openjdk.java.net/~redestad/scratch/jar.metanames.00/

      This reduces retained footprint of Jar-/ZipFile by slimming down or removing the Source.metanames array entirely, and can be a significant speed-up.

        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:
                Resolved: