Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use task queue to spawn multiple processes of tidy #126

Merged
merged 1 commit into from
Aug 20, 2024

Conversation

bwrsandman
Copy link
Contributor

@bwrsandman bwrsandman commented May 20, 2024

This PR streamlines build_clang_tidy_warnings to be easily dispatched by a multi-process queue. Each process stores the fixes in a temporary directory.
The queue will dispatch a clang-tidy process per file to check. This way more complex files can run at the same time as less complex ones.
Added a function to combine fixes after the queue is done running.

The design is copied from llvm's run-clang-tidy.py script and adapted for the current code.

Things I've noticed running this:

  • On ubuntu actions, this spawns 4 processes.
  • Cancelling a workflow only cancels the running queue processes but will still do the post step.
  • The logs get spammed. (Fix regression to cull_comments #128)
  • It's hard to tell which log did what.
  • A change with 28 files took 17m 45s with 4 processes while upstream took 33m 11s
  • The file ranges cover the whole source but each process is a single file.

Depends on:

Closes #124

@bwrsandman bwrsandman force-pushed the multiprocess branch 5 times, most recently from 42d9a79 to 0c9d02e Compare May 23, 2024 18:17
@bwrsandman bwrsandman marked this pull request as ready for review May 23, 2024 18:17
@bwrsandman bwrsandman force-pushed the multiprocess branch 2 times, most recently from dabad6d to 8afefe1 Compare July 9, 2024 13:19
@bwrsandman
Copy link
Contributor Author

@ZedThree fixes done

@bwrsandman bwrsandman requested a review from ZedThree July 19, 2024 22:32
@bwrsandman
Copy link
Contributor Author

@ZedThree ping!

@ZedThree ZedThree merged commit 88d4e32 into ZedThree:master Aug 20, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multi process the tidy call
2 participants