gulrak / filesystem

An implementation of C++17 std::filesystem for C++11 /C++14/C++17/C++20 on Windows, macOS, Linux and FreeBSD.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Performance enhancement for directory iteration on POSIX

gulrak opened this issue · comments

This ticket collects some aspects that lead to lower performance on directory iteration on POSIX backend (e.g. macOS, Linux and FreeBSD).

  • fs::status doesn't always fill symlink information when possible, leading to subsequent redundant ::lstat calls.
  • fs::directory_iterator always recreates fs::directory_entry even when there is fs::directory_entry::assign
  • fs::recursive_directory_iterator queries full status and symlink status even when the only question is it the type is directory or symlink.

This is now part of release v1.5.2