Replies: 4 comments 12 replies
-
TL;DR - Its on my radar, but not a high priority without community contributions. I have been considering migrating to async ops, but I haven't experimented with it yet. So far, the biggest slow-down seems to be when running clang-tidy (despite file size or diagnostics used). I know we could run clang-tidy on a batch of files at once, but that makes parsing clang-tidy's output much more complex (and risks making the CI logs confusing). My first concern is the ordering of the logs. Processing things serially has made organizing the logs easier, but processing them in parallel will require large buffers for logs (that get flushed to stdout upon completion). This shall not be scoffed at because comprehensible/legible logs have proved invaluable when troubleshooting. Secondly, Windows does impose limits about how many processes can access open files. This is a concern when running analysis in parallel using both clang-tidy and clang-format on the same set of files. PS - I just did a complete refactor of the python code base. In addition to a new beta feature (PR review suggestions), you might see a small speed up in the upcoming cpp-linter-action v2.9.0 (or cpp-linter v1.7.1 if using the python pkg directly). Although, the PR review feature will definitely make runtime much longer... FWIW, I've been working on a rust port of this pkg: cpp_linter_rs. Using rust as a backend will provide a better foundation (compared to CPython) to run tasks in parallel. |
Beta Was this translation helpful? Give feedback.
-
I don't see this
@mccrearyp What version of clang-tidy are you using? Are you using some clang plugin? Is the option specific to Linux/Unix builds? |
Beta Was this translation helpful? Give feedback.
-
Bad news from
|
Beta Was this translation helpful? Give feedback.
-
Big thanks to @jnooree for solving the challenges that this request presented. 💯 🎉 🥇 Parallelism is now implemented in cpp-linter-action v2.11.0 (& cpp-linter python package v1.8.0). |
Beta Was this translation helpful? Give feedback.
-
I'm using a workflow in github that uses this project and its been working great, however it takes a long time to run. It looks like it processes the files serially one at a time. Is it possible to do something similar to a "-j" flag like clang-tidy supports to lint and gather the output from multiple files simultaneously so people have the option to allocate more jobs and reduce the time it takes the workflow to run?
Here is an example of the time it took in our CI:
When I ran clang-tidy directly with -j20 it took about 3-4 minutes.
Beta Was this translation helpful? Give feedback.
All reactions