Sonar Analyze for c++ takes long time

I have a project c++ with ~300k line and it takes ~ 3 hours to finish analyzing on pull request (even pr just has a few changes), I think because of the build step.
For c++, need to build whole project to scan check, but for other language like: swift or python, it doesn’t need to build for scanning, so it’s very fast for scanning (takes ~ 2-3 minutes to finish).
My question is: is there a way to make c++ analyzing faster? Can I disable the build step for c++ like other language?


Hey there.

What version of SonarQube are you using?

I’m using Developer Edition Version 9.2.1

First, I would suggest upgrading to SonarQube v9.7. SonarQube v9.2.1 was released a year ago, and a lot of improvements have been made.

If you still experience slowness after upgrading, please come back to this thread.