From 7a8845548d06c8950bf8bd9ec9a6a56a9af8a5a3 Mon Sep 17 00:00:00 2001 From: Stephen Anthony Date: Tue, 18 Oct 2022 17:21:13 -0230 Subject: [PATCH] Speed up file/directory access in Windows by 3-4x. --- src/os/windows/FSNodeWINDOWS.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/os/windows/FSNodeWINDOWS.cxx b/src/os/windows/FSNodeWINDOWS.cxx index e06ff2c07..683236e84 100644 --- a/src/os/windows/FSNodeWINDOWS.cxx +++ b/src/os/windows/FSNodeWINDOWS.cxx @@ -143,7 +143,8 @@ bool FSNodeWINDOWS::getChildren(AbstractFSList& myList, ListMode mode) const { // Files enumeration WIN32_FIND_DATA desc; - HANDLE handle = FindFirstFile((_path + "*").c_str(), &desc); + HANDLE handle = FindFirstFileEx((_path + "*").c_str(), FindExInfoBasic, + &desc, FindExSearchNameMatch, NULL, FIND_FIRST_EX_LARGE_FETCH); if (handle == INVALID_HANDLE_VALUE) return false;