Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/fromager/sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -859,6 +859,8 @@ def scan_compiled_extensions(
for directory, _, filenames in root_dir.walk():
for filename in filenames:
filepath = directory / filename
if not filepath.is_file():
continue
Comment on lines +862 to +863
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is_file use a syscall. I have written the code in a way that reduces the amount of syscalls and I/O activity.

Can you move right before filepath.open and add a comment why it is needed?

Copy link
Copy Markdown
Member Author

@mikedep333 mikedep333 Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll update this commit to improve vs #1004 , which was merged

suffix = filepath.suffix
if suffix in extension_suffixes:
relpath = filepath.relative_to(root_dir)
Expand Down
Loading