Jump to content
Sign in to follow this  
Rollo62

Interesting read: How to Query File Attributes 50x faster on Windows

Recommended Posts

Interesting but... TLDR; the "50x faster" only applies if:

  • You are using the C++17 std::filesystem now.
  • You are using GetFileAttributesEx now to get the attributes.

In IOUtils the TFile.GetSize function is the only one using GetFileAttributes* directly. Unfortunately IOUtils defers to SysUtils for many of its function and there's widespread use of GetFileAttributes* in there.

Interestingly SysUtils contains an internal GetFileAttributesExEmulated function that is implemented using FindFirstFile but unfortunately that is only used from the FileAge functions and only in case of a sharing violation.

  • Like 2

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×