Skip excluded files early in schedule handler candidate filter#2275
Merged
hiroshinishio merged 1 commit intomainfrom Feb 19, 2026
Merged
Skip excluded files early in schedule handler candidate filter#2275hiroshinishio merged 1 commit intomainfrom
hiroshinishio merged 1 commit intomainfrom
Conversation
The candidate-adding loop only checked for 100% coverage but not is_excluded_from_testing, causing 12,000+ already-excluded files to be added as candidates on every run. This wasted ~5 minutes iterating through them in the evaluation loop. Now excluded files are filtered out upfront, reducing candidates from ~12,000 to ~67 for repos like SPIDERPLUS-web.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
is_excluded_from_testing, causing 12,000+ already-excluded files to be added as candidates on every runSocial Media Post (GitAuto)
Our schedule handler was iterating through 12,000 files on every run for a large repo - even though 12,530 of 12,597 were already marked "excluded" in the database. The exclusion check was in the wrong loop. Moved it earlier. Candidates dropped from 12,000 to 67.
Social Media Post (Wes)
Debugging why a scheduled Lambda took 5 minutes just to pick one file. Turns out the filter loop checked coverage percentages but not the exclusion flag. 12,530 files were already excluded in the DB - the code just never asked. Two lines, 12,000 fewer iterations.