clang-tidy is slow
On a recent pipeline for an MR (!242 (merged)), clang-tidy failed because it timed out after one hour.
Some poking around on the interwebs shows that there are a number of checks in clang-tidy which are known to be slow. I think that it would be beneficial to investigate which checks are slowing down clang-tidy in this project, and then decide next steps. Is it a beneficial check? If not, remove it altogether.
For checks that are slow but we want to keep, a couple ideas:
- Separate into two CI steps: clang-tidy-fast and clang-tidy-slow
- clang-tidy-fast could be run first, and thus fail first, giving quicker feedback to MR authors
- Consider running clang-tidy-slow post submit
To determine which steps are contributing to slowness, it looks like clang-tidy --enable-check-profile
can be used to produce a timing profile for each check.