Having noticed that the latest SonarQube 8.5 release dropped overnight, I was keen to upgrade our Enterprise edition test instance as we were eager to evaluate the latest version of the CFamily language plugin. In particular we were interested to see if the delivery of https://jira.sonarsource.com/browse/MMF-2099 had improved the analysis times for our Visual C++ (MS Build) projects. Unfortunately it seems to have made things worse.
Using the same analysis settings (same Quality Profile, cache disabled) and instance type (AWS EC2 r5d.2xlarge) the analysis time of one the projects I evaluated has nearly tripled. Consider the following log extracts for the analysis of this project:
INFO: Sensor CFamily [cpp] 15:44:19 INFO: CFamily plugin version: 220.127.116.1130 15:44:19 INFO: Using build-wrapper output: Z:\buildAgent\work\ef3d2ccf22bae763\.sonar_output\build-wrapper-dump.json 15:44:19 INFO: Available processors: 8 15:44:19 INFO: Using 8 threads for analysis according to value of "sonar.cfamily.threads" property. 15:44:22 INFO: Cache is explicitly disabled: Optional[false] .... INFO: Subprocess(es) done in 419500ms 15:51:22 INFO: 261 compilation units analyzed 15:51:22 INFO: Sensor CFamily [cpp] (done) | time=422584ms
INFO: Sensor CFamily [cpp] 14:33:08 INFO: CFamily plugin version: 18.104.22.16861 14:33:08 INFO: Using build-wrapper output: Z:\buildAgent\work\ef3d2ccf22bae763\.sonar_output\build-wrapper-dump.json 14:33:08 INFO: Available processors: 8 14:33:08 INFO: Using 8 threads for analysis according to value of "sonar.cfamily.threads" property. 14:33:10 INFO: Cache is explicitly disabled: Optional[false] .... INFO: PCH: unique=2 use=224 (forceInclude=0,throughHeader=224,firstInclude=0) out of 261 (forceInclude=0,throughHeader=260) .... 14:53:57 INFO: Subprocess(es) done in 1246579ms 14:53:57 INFO: 263 compilation units analyzed 14:53:57 INFO: Sensor CFamily [cpp] (done) | time=1249206ms
I’ve evaluated a couple of other projects and, while they aren’t as badly effected as the example above, the performance is unfortunately always worse under SonarQube 8.5.
Do you have any suggestions/ideas as to what may be the root cause of the issue? I’d happily provide logs, extra info etc privately if it helps. I’d also be keen to know if the expectation was for there to be a noticeable performance improvement with this release (or at least under what situations it could be expected). For reference the delivery of https://jira.sonarsource.com/browse/MMF-2078 in 8.4.2 did see an improvement of 25-35% for the analysis time of our projects.
I look forward to your feedback!