Expected performance hit with new Java analyzer?

With version 6.0 of SonarJava the analyzer was exchanged [1]. As per announcement a performance hit is to be expected. Did you estimate for some sample projects how long the analysis should take with the new scanner?

After switching to the new scanner, the time to analyze our projects increased from 3 hours to 41 hours. We had some issues before [2], but eventually those were solved. On SonarQube the analysis time increased, but not by much.

Version infos:

SonarQube Scanner 3.0.3.778
SonarQube server 7.9.1
SonarJava 6.0.1.20589

Enabling debug output didn’t yield any insights (we have some large files for which the ExplodedGraphWalker throws a MaximumStepsReachedException, but those files aren’t new). We have some custom rules which I could disable; the last time, though, it didn’t make a difference.


[1] Java analyzer v6.0: more accurate analysis, with fewer false-positives
[2] Troubleshooting lengthy Java analysis

Hi @oliver,

Just to be sure : are you using community edition of Sonarqube ? or another version ? (I’m searching for eventual usages of security rules).
Would it be possible for you to share the logs of analysis ? In order to understand where the time is spent (on which sensor).

Hi @Nicolas_Peru,

We are using the Community Edition. Which logs do you need? Are the console output of the Jenkins job and the analysis.log from .scannerwork/scanner-report sufficient?

If you’re using community edition, then security rules are out of scope.

I am interested by the log of the analysis running on your jenkins (which is what takes time) not the logs on your sonarqube server.

I can definitely provide you with the Jenkins output, it prints for example

15:46:05.920 DEBUG: 'path/to/file' generated metadata with charset 'UTF-8'
15:46:06.549 INFO: 372/38212 files analyzed, current file: path/to/file

Are there any other logfiles which could help you?

Let’s start with this first.

Can you send a private message to me so that I can share the logs privately (I do not have permissions to send you a private message)?

I have the same problem. Any solutions? According to the log, we can see the new version takes 2 seconds longer than the old one. 2020-04-02T16:00:00Z test_6.7.txt (6.4 KB) test_7.9.1.txt (6.7 KB)

Hello @Liyar,

Version 6.3 of the Java Analyzer is about to be released (beginning of next week), and it should drastically improve performances, and restore it to a state similar to our 5.X serie. I would invite you to try again with it in a few days.

Michael

Hi,
Thanks for your reply!Look forward to the new version and I’m willing to have a try .
Liyar

@Liyar version 6.3 has been released. Please give it a try.
If you are experiencing issues, please open a new thread.