SonarQube
  1. SonarQube
  2. SONAR-2164

Add an option to skip the quadratic "Package design analysis" phase

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.5
    • Fix Version/s: 2.9
    • Component/s: DSM
    • Labels:
      None
    • Number of attachments :
      1

      Description

      For large projects and/or projects with bad separation of concerns between packages, the "Package design analysis" phase can take ages and totally prevent using Sonar.
      An option should be added to skip this phase or at least skip the quadratic analysis behind it.

      JIRA opened from discussion at http://old.nabble.com/%22Package-design-analysis%22-is-too-slow-%28been-running-for-4-days-already...%29-td30833804.html.

        Issue Links

          Activity

          Hide
          Yannis BRES added a comment -

          Here is a patch suggestion: when adding <sonar.skipPackageDesignAnalysis>true</sonar.skipPackageDesignAnalysis> in the <properties> element of the pom,xml, one can skip the "Package design analysis" phase.
          Internally, this just skips the execution of org.sonar.plugins.squid.bridges.DesignBridge.
          All comments regarding this patch are very welcome, as I don't know anything at all of Sonar's internals!

          Show
          Yannis BRES added a comment - Here is a patch suggestion: when adding <sonar.skipPackageDesignAnalysis>true</sonar.skipPackageDesignAnalysis> in the <properties> element of the pom,xml, one can skip the "Package design analysis" phase. Internally, this just skips the execution of org.sonar.plugins.squid.bridges.DesignBridge. All comments regarding this patch are very welcome, as I don't know anything at all of Sonar's internals!
          Yannis BRES made changes -
          Field Original Value New Value
          Attachment SONAR-2164.diff [ 53749 ]
          Simon Brandhof made changes -
          Fix Version/s 2.7 [ 17101 ]
          Freddy Mallet made changes -
          Fix Version/s 2.8 [ 17216 ]
          Fix Version/s 2.7 [ 17101 ]
          Simon Brandhof made changes -
          Assignee Evgeny Mandrikov [ godin ]
          Hide
          Andreas Mandel added a comment -

          An different option would be to timebox the analysis. Meaning to stop the analysis after a certain number of cycles was found and a given maximum amount of time has been spent analyzing.

          Show
          Andreas Mandel added a comment - An different option would be to timebox the analysis. Meaning to stop the analysis after a certain number of cycles was found and a given maximum amount of time has been spent analyzing.
          Hide
          Pavlova added a comment -

          Hello,
          I am facing important performance issues with the "Package Design Analysis" which is the subject of the Sonar - 2164 issue.
          As far as I understand, the issue is still not resolved and the latest realeses still not support the option for switching off this analysis. When would be this feature integrated in Sonar? If this does not happen in the near future, I wonder how I can make Sonar avoid this very intensive part of the analysis ?
          Thanks in advance

          Show
          Pavlova added a comment - Hello, I am facing important performance issues with the "Package Design Analysis" which is the subject of the Sonar - 2164 issue. As far as I understand, the issue is still not resolved and the latest realeses still not support the option for switching off this analysis. When would be this feature integrated in Sonar? If this does not happen in the near future, I wonder how I can make Sonar avoid this very intensive part of the analysis ? Thanks in advance
          Hide
          Freddy Mallet added a comment -

          for information, the property "sonar.skipDesign" already allows to skip design analysis. But that's already deactivate sonar rules based on bytecode (deadcode detection, too high DIT, ...) and some metric computations (LCOM4, RFC, ...)

          Show
          Freddy Mallet added a comment - for information, the property "sonar.skipDesign" already allows to skip design analysis. But that's already deactivate sonar rules based on bytecode (deadcode detection, too high DIT, ...) and some metric computations (LCOM4, RFC, ...)
          Hide
          Pavlova added a comment -

          I am not sure what you mean by "sonar.skipDesign already allows to skip design analysis". I am running Sonar 2.5 and when setting -Dsonar.skipDesign in either local or global maven options, Sonar still keeps the Package design analysis running (which takes ages over the project I am analysing).
          Do you mean that "sonar.skipDesign" has changed functionality in versions later than 2.5?

          Show
          Pavlova added a comment - I am not sure what you mean by "sonar.skipDesign already allows to skip design analysis". I am running Sonar 2.5 and when setting -Dsonar.skipDesign in either local or global maven options, Sonar still keeps the Package design analysis running (which takes ages over the project I am analysing). Do you mean that "sonar.skipDesign" has changed functionality in versions later than 2.5?
          Freddy Mallet made changes -
          Fix Version/s 2.9 [ 17322 ]
          Fix Version/s 2.8 [ 17216 ]
          Hide
          Sasha Ovsankin added a comment -

          Writing this while the sonar build is in its 3th hour. Without a workaround we won't be able to use Sonar I am afraid.

          Show
          Sasha Ovsankin added a comment - Writing this while the sonar build is in its 3th hour. Without a workaround we won't be able to use Sonar I am afraid.
          Evgeny Mandrikov made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Evgeny Mandrikov made changes -
          Original Estimate 0 minutes [ 0 ]
          Remaining Estimate 0 minutes [ 0 ]
          Assignee Evgeny Mandrikov [ godin ] Freddy Mallet [ freddy.mallet ]
          Hide
          Evgeny Mandrikov added a comment -

          Sorry Yannis, but your patch was declined, however this feature was implemented in https://github.com/SonarSource/sonar/commit/c55c3c916bd1f76f52a237e5b49eca880f8a2945

          So Freddy could you please test it?

          Show
          Evgeny Mandrikov added a comment - Sorry Yannis, but your patch was declined, however this feature was implemented in https://github.com/SonarSource/sonar/commit/c55c3c916bd1f76f52a237e5b49eca880f8a2945 So Freddy could you please test it?
          Evgeny Mandrikov made changes -
          Status In Progress [ 3 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Hide
          Yannis BRES added a comment -

          No problem !

          I asked what I could do to make the patch I suggested more compliant to whatever rules you have and that I'm of course not aware of but, apparently, your changeset is not that different.
          Anyway, I'm (and I guess others will) glad to see that there will be something in official releases !

          Thanks again at lot for your work, guys,
          Yannis

          Show
          Yannis BRES added a comment - No problem ! I asked what I could do to make the patch I suggested more compliant to whatever rules you have and that I'm of course not aware of but, apparently, your changeset is not that different. Anyway, I'm (and I guess others will) glad to see that there will be something in official releases ! Thanks again at lot for your work, guys, Yannis
          Hide
          Freddy Mallet added a comment -

          Tested

          Show
          Freddy Mallet added a comment - Tested
          Freddy Mallet made changes -
          Assignee Freddy Mallet [ freddy.mallet ] Evgeny Mandrikov [ godin ]
          Hide
          Evgeny Mandrikov added a comment -

          In fact Mariela Pavlova was right : bytecode might be analysed (and so package design also) even if "sonar.skipDesign" was set to "true" - see SONAR-2487.

          Show
          Evgeny Mandrikov added a comment - In fact Mariela Pavlova was right : bytecode might be analysed (and so package design also) even if "sonar.skipDesign" was set to "true" - see SONAR-2487 .
          Evgeny Mandrikov made changes -
          Link This issue relates to SONAR-2487 [ SONAR-2487 ]
          Evgeny Mandrikov made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Evgeny Mandrikov
              Reporter:
              Yannis BRES
            • Votes:
              5 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: