I am using ALE plugin with clangtidy linter to lint my C code and whenever I save my file and this linter gets activated it takes around 3-4 seconds for it to check for errors. File in question is around 1000 lines long and I am using a compilation database (compile_commands.json file). Is this the default behaviour of clangtidy? Is it just slow? Or what could be the problem?

Any help is highly appreciated. Thanks

  • 2
    Ale should be asynchronous... does the 3-4 second delay prevent you from using vim? If not, then I’d say this is jusg clangtidy not scaling to 1000 lines well (on a side note: modularize!).
    – D. Ben Knoble
    Commented Jul 25, 2019 at 3:56
  • 1
    I will try to modularize, good tip, as for the linter it is indeed just clandtidy not scaling up well or so it seems. Thanks for your feedback
    – vimEnjoyer
    Commented Jul 25, 2019 at 18:44

1 Answer 1


Since I ran this linter as an external command and it gave me the same delay to go through the file, I assume it is just really slow. So that's a shame...

P.S If you got any solutions on how to fight this delay in large files please feel free to comment below. Thanks

Edit: I now use ccls linter, it is fast (at the cost of big cache for every project, but it is worth it imo)

Edit2: To make clang-tidy faster disable clang-analyzer-* checks, to do this in ALE put this line into your .vimrc:

let g:ale_c_clangtidy_checks = ['-*', 'cppcoreguidelines-*']

you can change cppcoreguidelines with any other checks available in clang-tidy

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.