RFR: 8352642: Reduce cost of JAR directory scan in ArchiveContainer
Jason Zaugg
jzaugg at openjdk.org
Sun Mar 23 12:45:38 UTC 2025
On Sun, 23 Mar 2025 12:38:04 GMT, Jason Zaugg <jzaugg at openjdk.org> wrote:
> 8352642: Reduce cost of JAR directory scan in ArchiveContainer
src/jdk.compiler/share/classes/com/sun/tools/javac/file/JavacFileManager.java line 564:
> 562: public ArchiveContainer(Path archivePath) throws IOException, ProviderNotFoundException {
> 563: this.archivePath = archivePath;
> 564: if (multiReleaseValue != null && archivePath.toString().endsWith(".jar")) {
The else branch, which uses `FileSystems.newFileSystem(archivePath, (ClassLoader)null); rather than `jarFsProvider.newFileSystem`, is unchanged in the PR.
AFAICT that would only be taken when a client using `JavacFileManager` directly, omitting the `fm.handleOption(Option.MULTIRELEASE, .. )` call, or in a custom scenario with non-JAR archivess.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24176#discussion_r2009104482
More information about the compiler-dev
mailing list