How can I speed up the analysis of sonar packaging design?

I support the build process for a large (> 500,000 LOC) Java project. I just added the sonar analysis step to the end of the nightly builds. But it takes more than three hours to complete ... This is not a serious problem (it happens in one night), but I would like to know if I can speed it up (so that I can start it manually during working hours, if necessary).

Any options for sonar, Hudson, Maven or JDK. Can I customize what can improve the situation?

[INFO] ------------- Analyzing Monolith [INFO] Selected quality profile : Sonar way, language=java [INFO] Configure maven plugins... [INFO] Sensor SquidSensor... [INFO] Java AST scan... [INFO] Java AST scan done: 103189 ms [INFO] Java bytecode scan... ... (snip) [INFO] Java bytecode scan done: 19159 ms [INFO] Squid extraction... [INFO] Package design analysis... ... (over three hour wait here) [INFO] Package design analysis done: 12000771 ms [INFO] Squid extraction done: 12277075 ms [INFO] Sensor SquidSensor done: 12404793 ms 

12 million milliseconds = 200 minutes. This is a long time! In comparison, compilation and testing steps before a sonar step take less than 10 minutes. From what I can tell, the process is CPU related; a large pile does not affect. Maybe this should be because of the confusion / duplication analysis, I don't know. Of course, I know that the best option is to split the project! But it will take a lot of work; if I can tweak some configuration in the meantime, that would be nice.

Any ideas?

+4
source share
2 answers

From Freddy Mallet on the list:

"... the problem arises not from the database, but from the algorithm to identify all the dependencies of the package for cutting ... If you manage to reduce this project in several modules, your problem will disappear."

I tested this theory by excluding a relatively large package and, of course, plummeted. Theoretically, the number of connections can grow quadratically with the number of packets, so this approach is probably as good as possible with such a large code base.

+1
source

I walked on your boots: in a 2 million + loc project (it was supposed to be broken down into subprojects many years ago, really), I never saw a package design analysis end within 4 days after calculation ...

Like SONAR-2164 (add an option to skip the quadratic step of package design analysis) , I introduced a patch that allows users to set true in their maven project file so that package design analysis is skipped. This patch is pending approval and is currently scheduled for inclusion in v2.7.

+3
source

All Articles