Skip to content

Conversation

@wingfiring
Copy link
Contributor

@wingfiring wingfiring commented Dec 10, 2025

Description

On Windows, Filesystem::exists forward the call to std::filesystem::exists, and finally calls _std_fs_get_stats . _std_fs_get_stats is slow if the argument is a netwok path.

Tests

No, performance related.

Checklist:

  • I have read the contribution guidelines.
  • I have updated the documentation, if applicable. (Check if there is no
    need to update the documentation, for example if this is a bug fix that
    doesn't change the API.)
  • I have ensured that the change is tested somewhere in the testsuite
    (adding new test cases if necessary).
  • If I added or modified a C++ API call, I have also amended the
    corresponding Python bindings (and if altering ImageBufAlgo functions, also
    exposed the new functionality as oiiotool options).
  • My code follows the prevailing code style of this project. If I haven't
    already run clang-format before submitting, I definitely will look at the CI
    test that runs clang-format and fix anything that it highlights as being
    nonconforming.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Dec 10, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: wingfiring / name: JacksonSun-adsk (14a9eeb)

@lgritz
Copy link
Collaborator

lgritz commented Dec 10, 2025

This looks fine to me. Does anybody with Windows experience wish to comment?

@nrusch
Copy link
Contributor

nrusch commented Dec 12, 2025

I'm certainly not a Win32 expert, but this seems correct based on my understanding and some spelunking in the MSVC STL source (which, in hindsight, is not an activity I would recommend).

@lgritz
Copy link
Collaborator

lgritz commented Dec 12, 2025

LGTM. The bleeding edge CI test failure is entirely unrelated and happening on all branches. I'm investigating separately.

@lgritz lgritz merged commit ae04b6e into AcademySoftwareFoundation:main Dec 12, 2025
28 of 29 checks passed
lgritz pushed a commit to lgritz/OpenImageIO that referenced this pull request Dec 17, 2025
…oundation#4977)

On Windows, `Filesystem::exists` forward the call to
`std::filesystem::exists`, and finally calls `_std_fs_get_stats` .
`_std_fs_get_stats` is slow if the argument is a netwok path.

Signed-off-by: Jackson Sun <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants