[PATCH] D38716: Support: Have directory_iterator::status() return FindFirstFileEx/FindNextFile results on Windows.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 9 21:36:14 PDT 2017


pcc created this revision.
Herald added subscribers: hiraditya, mehdi_amini.

This allows clients to avoid an unnecessary fs::status() call on each
directory entry. Because the information returned by FindFirstFileEx
is a subset of the information returned by a regular status() call,
I needed to extract a base class from file_status that contains only
that information.

On my machine, this reduces the time required to enumerate a ThinLTO
cache directory containing 520k files from almost 4 minutes to less
than 2 seconds.


https://reviews.llvm.org/D38716

Files:
  clang-tools-extra/modularize/CoverageChecker.cpp
  clang-tools-extra/modularize/ModularizeUtilities.cpp
  clang/lib/Basic/VirtualFileSystem.cpp
  lldb/source/Commands/CommandCompletions.cpp
  lldb/source/Utility/FileSpec.cpp
  llvm/include/llvm/Support/FileSystem.h
  llvm/lib/Support/CachePruning.cpp
  llvm/lib/Support/Path.cpp
  llvm/lib/Support/Unix/Path.inc
  llvm/lib/Support/Windows/Path.inc
  llvm/unittests/Support/Path.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38716.118314.patch
Type: text/x-patch
Size: 26105 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171010/61bd21bd/attachment.bin>


More information about the llvm-commits mailing list