Rerunning SonarScanner takes 1h


(Enrico Stahn) #1

I’m currently testing SonarCloud. Running SonarScanner on our codebase takes 1h 45min for the first run and 45m to 1h for subsequent runs. It’s the same machine, same code, no changes.

Is this expected behaviour?


(Fabrice Bellingard) #2

Yes, it’s expected that the first analysis takes longer than the subsequent ones.
And it is indeed expected that subsequent analyses still take quite some time because SonarCloud analyses all the source code on every analysis (because a change on one file can impact many other files).


(Enrico Stahn) #3

@Fabrice_Bellingard There is no way this is going to be in the critical path (CI pipeline). If we would to use “Quality Gates” for branches with Sonar (something we already do with CodeClimate) then a deployment would take 2-3h instead of 14min.

I have disabled the CPD analyser which brings it down to ~13min just for Sonar.


(Fabrice Bellingard) #4

Out of curiosity, can you give details about the type of repo you are analysing? (number of lines of code, languages).

To complement what I said, analyses on PR are a bit faster than on main branches.