Sonar scanner slow on 200k loc

SonarQube 8.1
Latest SonarScanner

I am trying to analyze a ~200k c# line solution, it’s taking almost 30 minutes to complete. How can I get an output log of what sonarscanner is getting stuck on? right now i can see the projects that are taking a long time to analyze, but not what specific inside that project (sonar rules?) is taking so long.

I’ve tried limiting the scope to just one project, but it seems to be scanning the entire solution anyway. I’ve tried making sonarscanner run in verbose mode but it doesn’t print out any information during the dotnet build

1 Like

Hi,

Per the docs, you can pass additional parameters using /d:parameName=paramValue on the command line. The parameter you’d want to pass is sonar.log.level or sonar.verbose. There’s a subtle difference. The analysis parameter docs will give you the details.

 
HTH,
Ann

1 Like

Aren’t the default values sonar.log.level=INFO and sonar.verbose=false already the minimum logging level? Which values beside INFO and DEBUG are supported?

Last week I had the slowness issue with Java 8 on SonarQube 8.2. Building jar files 1m39s, Complete Soar analyses 10m49s and Publish quality gate results 10m22s. (initial analysis with Sonar way for legacy project of 650k lines in the end) With this additional overhead there will be no way to integrate it in PRs.

Hi @milbrandt,

TRACE is explicitly mentioned in the docs. I believe that’s a level below DEBUG. It’s a fair question tho exactly which levels are supported. One that I’ll kick over to documentation.

Once you have those low-level logs, it’ll help you identify specifically which steps are slow and will help us in turn tuning the behavior.

And @mlapaglia I just realized that I should have prompted you in my initial response to upgrade. The current version, 8.4.1, has some speed improvements in it that may help.

 
Ann

Thanks @ganncamp for forwarding to docu.

Can we now upgrade without any issues to 8.4.1 even using MS SQL database?
Do you need some specific feedback file from my side (not the original poster, but slow analyses for Java)?

Hi,

Yes you can safely upgrade. And yes, if after upgrade your analysis is still slow then logs would be appreciated. However, this is a #dotnet thread and won’t be looked at by the folks who would need your analysis-of-Java logs, so please open a new thread for that.

 
:slightly_smiling_face:
Ann