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

(zipfs) Review the name and semantics of zipinfo-time ZipFileSystem property

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 25
    • core-libs
    • None

      https://bugs.openjdk.org/browse/JDK-8150496 introduced the (undocumented) "zipinfo-time" property to help improve performance of the ZipFileSystem. When a ZipFileSystem is created with this property's value set to "false", then the implementation in ZipFileSystem, while constructing the entries from the ZIP file will skip reading the access time and the creation time of each ZIP entry from the entry's LOC header. This improves the performance of zipfs, since when reading the CEN, it no longer has to traverse to individual LOC headers to find the access time and creation time values of each entry.

      Setting "zipinfo-time" = false, thus implies that the ZipFileAttributes.creationTime() and ZipFileAttributes.lastAccessTime() APIs may not return the right values when used against Path(s) corresponding to the ZIP entries in that FileSystem. Not all usages of zipfs require or use the creationTime()/lastAccessTime() APIs. Such usages can set "zipinfo-time" = false and benefit from improved performance.

      This property isn't documented. Recent discussions in a related PR https://git.openjdk.org/jdk/pull/24176 have noted that it would be good to review the name of this property as well as formalize the semantics of this property and officially document it if appropriate.

            Unassigned Unassigned
            jpai Jaikiran Pai
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: