-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<filesystem>
: Improve symlink_status
performance
#5071
Conversation
3527b58
to
ce3f023
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Thanks! On my system (5950X, 24H2, Samsung SSD 980 PRO), I observe much less of a performance improvement, but still major: 21126 ns => 10098 ns, for a speedup of 2.1x. |
Thank you too! |
<filesystem>
: Improve symlink_status
performance
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
Thanks again, and congratulations on your first microsoft/STL commit! 😻 🎉 💾 This change is expected to ship in VS 2022 17.13 Preview 3. |
_Get_any_status(__Path, __std_fs_stats_flags::_Attributes | __std_fs_stats_flags::_Reparse_tag)
calls to many WinAPI functions for regular files or directories. It callsGetFileAttributesEx
+CreateFile
+GetFileInformationByHandleEx(FileBasicInfo)
butGetFileAttributesEx
is enough to get all needed data if it is known that a file is not a reparse point.This problem affects
symlink_status
performance.Benchmark
symlink_status
results before changes:Benchmark
symlink_status
results after changes: