RFR: 8352642: Set zipinfo-time=false when constructing zipfs FileSystem in com.sun.tools.javac.file.JavacFileManager$ArchiveContainer for better performance [v3]

Jaikiran Pai jpai at openjdk.org
Thu May 22 02:21:04 UTC 2025


On Sun, 20 Apr 2025 13:01:30 GMT, Jason Zaugg <jzaugg at openjdk.org> wrote:

>> zipfs has a (undocumented) property "zipinfo-time" which was introduced in https://bugs.openjdk.org/browse/JDK-8150496 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.
>> 
>> com.sun.tools.javac.file.JavacFileManager$ArchiveContainer is one such place where when constructing the FileSystem, it could pass this property. This is especially useful since this part of the code in practice can be dealing with large number of jar files in the classpath and creating one zipfs FileSystem for each such JAR file.
>> 
>> It has been reported in the compiler-dev mailing list, that an experiment to set "zipinfo-time" = false in this part of the code has shown very noticeable performance improvements, especially on Windows, when dealing with large classpath. Details in the thread here https://mail.openjdk.org/pipermail/compiler-dev/2025-March/029529.html.
>
> Jason Zaugg has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Update copyright and remove part of comment

Hello Jason, I'll just run this once in our CI today to make sure nothing fails against latest master. I'll add a comment here once that's complete and you can then integrate it.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/24176#issuecomment-2899711012


More information about the core-libs-dev mailing list