RFR: 8368633: (fs) Path.toRealPath(NOFOLLOW_LINKS) very slow on macOS [v3]

Alan Bateman alanb at openjdk.org
Tue Oct 14 06:37:03 UTC 2025


On Mon, 13 Oct 2025 22:33:25 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`.
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8368633: Compare keys using a second DirectoryStream; improve micro

src/java.base/unix/classes/sun/nio/fs/UnixPath.java line 988:

> 986:                                 break;
> 987:                             }
> 988:                         } catch (UnixException ignore) {

I looked back at our discussion in JDK-8295753 (pr/10843) as to why we catch UnixException here and the concern was about access to file that is not in the path. If you have cycles, then I think it would be good to dig into that further so understand which cases can be ignored and not ignored.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27709#discussion_r2428057914


More information about the nio-dev mailing list