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

Alan Bateman alanb at openjdk.org
Thu Oct 9 16:08:45 UTC 2025


On Thu, 9 Oct 2025 15:57:29 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> I think the compareTo == 0 to see byte representation is equal is good, that will avoid the stat to get the fileKey. The concern with the String/equalsIgnoreCase is that there may be false positives.
>
>> The concern with the String/equalsIgnoreCase is that there may be false positives.
> 
> But wouldn't it be the false negatives that would be the problem?

It's both, I think the only way to avoid the stat call will be to compare the bytes (like the first check).

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

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


More information about the nio-dev mailing list