<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/59747>59747</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            clang-analyzer-core checks are very slow
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang:static analyzer,
            performance,
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          carlosgalvezp
      </td>
    </tr>
</table>

<pre>
    Hi!

As I posted in this [other issue](https://github.com/llvm/llvm-project/issues/59642#issuecomment-1363223257), I notice that `clang-analyzer-*` (in particular `clang-analyzer-core*`) checks are extremely slow (I am running them through `clang-tidy`).

For comparison, Clang compiler takes less than 2 seconds to analyze the TU, while `clang-analyzer-core` checks take almost 6 minutes to go through it. That's 180x slower.

Before spending time preparing a minimal example out of my original code, I wanted to ask some preliminary questions:

* Clang analyzer is supposed to be slower than compilation, but is it normal that it is **that much** slower? 
* Is there any particular setting that makes the checks slower? Can I configure the tool to trade off speed vs accuracy? I cannot remove individual checks, because clang-tidy will enable all or nothing.
* How can I profile the checks further? 

Thanks!
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJykVM1yqzgTfRp50xUXNGCbBQsnKdf1Pt8DCNGAvgg1ox87vk8_JXBiT9Wd1WxwuUs6fU730ZHe68ESNaJ6FdX7RsYwsmuUdIb9IM2Ffs-blrtb80sLzEX2LrLj-j16OMPMPlAH2kIYtQdRvXIYyYH2PpKo3gUexhBmL4qjwJPA06DDGNut4kngyZjL98_L7Pj_pILA03LXCzxV9a5EgcVSUDxNZMNLXuwKxAKrvcBa4BucwXLQiiCMMoDYZcpIO7xIK83tN7kXgUexy0DgQVuYpQtaRSPdH04qdrSeFliDGkl9epCOgL6Co4nMDbzha4I6g5zARWu1HSCMNEEYHcdhfMAG3d1WqO3z2E7sQPE0S6c92yTgLR1fatqQgyA_yYMh75MiCwieFN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