.NET takes insanely longer than my other projects

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    → SonarQube Version 9.9.1
  • how is SonarQube deployed: zip, Docker, Helm
    → building the project through .dll in a Windows Server 2022
  • what are you trying to achieve
    → Decrease the duration of the scan

So I have a WS 2022 server where I am running sonar scan on my .NET project. This project takes longer than my other projects which usually takes under 30s to scan and upload the analysis to the SonarQube server. This takes on average 20 min to run the scan for my .NET project.

This is the only project I have that is running on WS2022, so I am not sure if this is the normal time it takes on a WS2022? Another factor that is different to my other project is that this project contains around 450k lines of code.

Also for some reason the Jenkins console does not output any information such as whether the execution has succeeded or not and the only reason I am even able to tell how long a scan took is by running a job in Jenkins with and without the sonar scan to find out the difference in time. I’ve tried sonar.verbose=true as well as -Dsonar.verbose=true.

So my question is how to decrease the time taken for the scan as well as showcase the INFO logs in the Jenkins job?

Thanks

Hi,

We’ve made a number of improvements to C# analysis speed since 9.9(.*). Can you upgrade?

 
Ann

Hi Ann,

I believe so, but before upgrading, I need to know if its worth it. In your opinion, please estimate how much can we decrease the time from 20min if we were to upgrade to 9.9.+.

Many Thanks

Hi,

It’s difficult to know. There were several changes of varying impact depending on your context. One of them made the most “expensive” rule 50% faster. Others were less impactful.

Perhaps you can spin up a test instance of 10.2 and try analysis against it?

 
Ann

Hi Ann,

Thank you for the suggestion, I will let you know how it goes

Thanks