Passing ziptime-info=false to ZipFileSystemProvider (along with other classpath performance ideas)
Jaikiran Pai
jai.forums2013 at gmail.com
Sun Mar 16 09:40:33 UTC 2025
Hello Jason,
On 02/03/25 7:13 pm, Jason Zaugg wrote:
> I've been analysing the performance of javac in a relatively large
> codebase and found classpath scanning to be the dominant factor. There
> are large numbers of compilation tasks, most with long classpaths
> including large JARs.
>
> I've been using the wall-time profiling mode of async-profiler to
> analyse where time is being spent.
>
> I've been able improve build times (most dramatically on Windows, 750s
> reduced to 350s) by modifying javac to:
>
> 1. pass ziptime-info=false to the env Map of
> jarFsProvider.newFileSystem, which means the classpath scan in the
> constructor of ArchiveContainer need only read the ZIP central
> directory, rather then reading per-entry Extended Time metadata.
I am not familiar with the compiler implementation code, but speaking in
context of the ZipFileSystem, it appears that this (undocumented)
"ziptime-info" property of the ZIP file system was indeed introduced to
help improve the performance of the ZipFileSystem. Setting it to false
implies that the lastAccessTime() and the creationTime() returned by the
ZipFileAttributes may not be accurate for some entries, since settings
this property to false skips reading the per entry creation and access
time information for the entries. Would you happen to know if either of
these two methods are used in the code path where you are proposing to
add "ziptime-info=false"?
-Jaikiran
More information about the compiler-dev
mailing list