RFR: 8208077: File.listRoots performance degradation
Alan Bateman
alanb at openjdk.org
Wed Jan 18 15:48:05 UTC 2023
The Windows implementation of File.listRoots was changed in JDK 10 to test the root directory of each "logical drive" to see that it exists. The motive was to filter out drive letters corresponding to removable media where the media is not present. This is problematic for a number of reasons that include performance (esp. for mapped drives), inconsistency with FileSystem::getRootDirectories, and surprising behavior when media is re-inserted. After re-examining this area again, the best thing seems to be just undo this change so that File.listRoots doesn't attempt to do the problematic filtering.
-------------
Commit messages:
- Initial commit
Changes: https://git.openjdk.org/jdk/pull/12072/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=12072&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8208077
Stats: 29 lines in 2 files changed: 17 ins; 1 del; 11 mod
Patch: https://git.openjdk.org/jdk/pull/12072.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/12072/head:pull/12072
PR: https://git.openjdk.org/jdk/pull/12072
More information about the core-libs-dev
mailing list