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

Improve handling of JarFile META-INF resources

XMLWordPrintable

      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.

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

              Created:
              Updated:
              Resolved: