Skip to content

relink.py: Improve efficiency - #12

Merged
samsrabin merged 2 commits into
ESMCI:mainfrom
samsrabin:improve-efficiency
Jan 15, 2026
Merged

samsrabin merged 2 commits into
ESMCI:mainfrom
samsrabin:improve-efficiency

Conversation

@samsrabin

Copy link
Copy Markdown
Collaborator

relink.py: Use os.scandir() instead of os.walk(). os.scandir() caches stat information during directory traversal, so this reduces system calls. Results in a speedup of about 84% on Derecho, from ~230 seconds to ~37 (n=1 of each).

os.scandir() caches stat information during directory traversal, so this reduces system calls. Results in a speedup of about 84% on Derecho, from ~230 seconds to ~37 (n=1 of each).
@samsrabin
samsrabin requested a review from jedwards4b January 15, 2026 23:20
@samsrabin samsrabin self-assigned this Jan 15, 2026
@samsrabin samsrabin added the enhancement New feature or request label Jan 15, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.48485% with 3 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@b3dd56f). Learn more about missing BASE report.

Files with missing lines Patch % Lines
relink.py 94.23% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main      #12   +/-   ##
=======================================
  Coverage        ?   99.23%           
=======================================
  Files           ?       10           
  Lines           ?      780           
  Branches        ?        0           
=======================================
  Hits            ?      774           
  Misses          ?        6           
  Partials        ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@samsrabin
samsrabin merged commit 0027181 into ESMCI:main Jan 15, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants