RFR: 8368633: (fs) Path.toRealPath(NOFOLLOW_LINKS) very slow on macOS
Alan Bateman
alanb at openjdk.org
Thu Oct 9 10:48:02 UTC 2025
On Wed, 8 Oct 2025 23:59:53 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
> Try to avoid checking file keys for all entries by first attempting `Path.compareTo` and `String.equalsIgnoreCase`.
src/java.base/unix/classes/sun/nio/fs/UnixPath.java line 965:
> 963: path = path.resolve(entry);
> 964: break;
> 965: } else if (name.toString().equalsIgnoreCase(elementName)) {
The compareTo at L961 looks right but the using toString is problematic here is problematic. If the name and element are not equal then I think it has to use file key.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27709#discussion_r2416360621
More information about the nio-dev
mailing list