mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-04 04:40:56 -06:00
Exporting targets having large FILE_SETs with install(EXPORT) or export(EXPORT) currently performs poorly on Windows compared to Unix-like systems, because cmFileSet::EvaluateDirectoryEntries calls SystemTools::SameFile on every pair of parent directories in the file set. SystemTools::SameFile opens and closes two read-only filesystem handles. This causes a significant performance drop on Windows for FILE_SETs with even a couple of dozens of files. Use the recently added SystemTools::GetFileId function in kwsys (https://gitlab.kitware.com/utils/kwsys/-/merge_requests/298) instead of SameFile to cache the identity of a directory in cmFileSet::EvaluateDirectoryEntries. This means only one filesystem handle is needed per distinct directory path, instead of two per (even if they're equal) directory pair.
7.6 KiB
7.6 KiB