Skip to content

Look up excluded parents in a set - #310

Merged
soimkim merged 1 commit into
mainfrom
gradle
Sep 1, 2026
Merged

soimkim merged 1 commit into
mainfrom
gradle

Conversation

@soimkim

@soimkim soimkim commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

get_excluded_paths() checked each walked entry against the accumulated exclude list, so the cost grew with the number of already excluded paths. On a 533k file tree this dominated the call at 111s; a parallel set brings it to 9s with identical return values.

Summary by CodeRabbit

  • Performance
    • Improved exclusion processing efficiency when checking files and directories with excluded parent paths.
  • Bug Fixes
    • Preserved existing exclusion behavior while making exclusion tracking more consistent.

get_excluded_paths() checked each walked entry against the accumulated
exclude list, so the cost grew with the number of already excluded paths.
On a 533k file tree this dominated the call at 111s; a parallel set brings
it to 9s with identical return values.
@soimkim soimkim self-assigned this Sep 1, 2026
@soimkim

soimkim commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

FL Source 속도 개선 이슈로 수정하는 건

@coderabbitai

coderabbitai Bot commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: c9e1d071-c66c-4fef-80bc-06728dd2a601

📥 Commits

Reviewing files that changed from the base of the PR and between 40ce367 and ba76a27.

📒 Files selected for processing (1)
  • src/fosslight_util/exclude.py

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The exclusion scan now keeps the existing list for returned paths and adds a set for parent-path checks. A mark_excluded helper updates both collections, while exclusion rules remain unchanged.

Changes

Exclusion lookup optimization

Layer / File(s) Summary
Lookup and exclusion recording
src/fosslight_util/exclude.py
get_excluded_paths maintains a lookup set alongside the output list. Directory and file checks use the set, and mark_excluded records each excluded path in both collections.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to ba76a

This localized performance improvement is merge-ready after normal checks and review; no actionable merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: using a set to look up excluded parent paths.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch gradle

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@soimkim
soimkim merged commit f29be1d into main Sep 1, 2026
6 of 8 checks passed
@soimkim
soimkim deleted the gradle branch September 1, 2026 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant