SonarQube scans taking long time to complete .NET projects analysis

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    9.9 LTS Enterprise

  • how is SonarQube deployed: zip, Docker, Helm
    Azure App Service PremiumV3 (P3v3)

  • what are you trying to achieve
    Make our analysis faster

I am taking over the SonarQube at our company and want to start with trying to understand how can we make out analysis faster? We have a build pipelines in the Azure DevOps running on our own build agents.

Some additional information from debug logs

08:03:57.914 INFO: Load New Code definition (done) | time=265ms
08:03:59.805 INFO: Analysis report generated in 8828ms, dir size=23.5 MB
08:06:11.167 INFO: Analysis report compressed in 131362ms, zip size=10.2 MB
08:06:11.167 INFO: Analysis report generated in C:\***\_work\2330\.sonarqube\out\.sonar\scanner-report
08:06:11.167 DEBUG: Upload report
08:06:14.198 DEBUG: POST 200 https://***/api/ce/submit?projectKey=***
08:06:14.261 INFO: Analysis report uploaded in 3094ms
08:06:14.292 DEBUG: Report metadata written to C:\***\_work\_temp\sonar\1186151\f74a56f6-8bd2-7f8d-98fd-2d2770269fb0\report-task.txt
08:06:14.292 INFO: ANALYSIS SUCCESSFUL, you can find the results at: https://***/dashboard?id=***
08:06:14.292 INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
08:06:14.292 INFO: More about the report processing at https://***/api/ce/task?id=***
08:06:14.292 DEBUG: Post-jobs : 
08:06:14.308 DEBUG: eslint-bridge server will shutdown
08:06:14.308 DEBUG: eslint-bridge server closed
08:06:21.542 INFO: Analysis total time: 18:03.756 s
08:06:21.542 INFO: ------------------------------------------------------------------------
08:06:21.542 INFO: ------------------------------------------------------------------------
08:06:21.558 INFO: Total time: 18:21.053s
08:06:21.823 INFO: Final Memory: 69M/234M
08:06:21.823 INFO: ------------------------------------------------------------------------
Process returned exit code 0
The SonarScanner CLI has finished
08:06:23.917  Post-processing succeeded.

SonarQube stats


You’ve listed that your SonarQube server is deployed on a ‘premium’ node. How about your build agent? The first answer to this is always to give the build agent more power. The second answer is to look at what’s being analyzed. Are there any generated files or libraries you can exclude?

Also, your title says this is a .NET project, but your analysis log snippet indicates that you’re using the SonarScanner CLI. For a .NET project, you should be using the SonarScanner for .NET. I don’t expect that to necessarily give you faster results, but it will likely give you more accurate results.

And finally, if you have any C / C++ in your project, you can make that part of the analysis, at least, multi-threaded


Hi @ganncamp,

Thanks for the reply. We are using Azure DevOps pipelines to run the scans as a part of the CI/CD integration. These logs are from the Azure DevOps pipeline run.

We will look into the information provided. Thanks a lot.


1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.