Skip to content

Conversation

@ytmimi
Copy link
Contributor

@ytmimi ytmimi commented Jan 29, 2026

This improves on the current diff check process. It's more efficient to process each file in parallel instead of processing each repo in parallel. Also, a new worker_threads option was added to control how many threads we want processing files at the same time.

I tried to break this PR up into logical commits so it might be best to review this one commit at a time.

Processing all files in parallel is more efficient than checking each
repo in parallel.

One issue with the current design of processing each repo in parallel is
that threads that process smaller repos end early and don't help process
files from larger repos. For example, r-l/rust is a large repo that
takes a long time to check because there's only one thread working on
it.

Besides enabling us to process all files in parallel,
`check_diff_for_file` return a `Result<(), (Diff, ..)>` instead of a
`u8`, which is a more idiomatic way to represent any errors we find when
checking for diffs.
Now we'll process each file in parallel instead of processing each repo
in parallel, and after checking all repositories we'll report on any
errors that we've found.
This option control how many threads process files in parallel.
@rustbot rustbot added A-CI Area: CI S-waiting-on-review Status: awaiting review from the assignee but also interested parties. labels Jan 29, 2026
@ytmimi
Copy link
Contributor Author

ytmimi commented Jan 29, 2026

@jieyouxu the A-CI label was added by rustbot :)

@ytmimi
Copy link
Contributor Author

ytmimi commented Jan 29, 2026

With these changes the time to run the Diff Check was cut in half.

Old Job

Screenshot 2026-01-28 at 11 17 17 PM

New Job

Screenshot 2026-01-28 at 11 14 57 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CI Area: CI S-waiting-on-review Status: awaiting review from the assignee but also interested parties.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants