Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-2164

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

    Details

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

      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

          yannis Yannis BRES created issue -
          Hide
          yannis 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 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 Yannis BRES made changes -
          Field Original Value New Value
          Attachment SONAR-2164.diff [ 53749 ]
          simon.brandhof Simon Brandhof made changes -
          Fix Version/s 2.7 [ 17101 ]
          freddy.mallet Freddy Mallet made changes -
          Fix Version/s 2.8 [ 17216 ]
          Fix Version/s 2.7 [ 17101 ]
          simon.brandhof Simon Brandhof made changes -
          Assignee Evgeny Mandrikov [ godin ]
          Hide
          amandel 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
          amandel 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
          mpav 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
          mpav 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 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 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
          mpav 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
          mpav 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 Freddy Mallet made changes -
          Fix Version/s 2.8 [ 17216 ]
          Fix Version/s 2.9 [ 17322 ]
          Hide
          sashao 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
          sashao 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.
          godin OLD - Evgeny Mandrikov made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          godin OLD - Evgeny Mandrikov made changes -
          Original Estimate 0 minutes [ 0 ]
          Remaining Estimate 0 minutes [ 0 ]
          Assignee Evgeny Mandrikov [ godin ] Freddy Mallet [ freddy.mallet ]
          Hide
          godin OLD - 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
          godin OLD - 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?
          godin OLD - Evgeny Mandrikov made changes -
          Status In Progress [ 3 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Hide
          yannis 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 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 Freddy Mallet added a comment -

          Tested

          Show
          freddy.mallet Freddy Mallet added a comment - Tested
          freddy.mallet Freddy Mallet made changes -
          Assignee Freddy Mallet [ freddy.mallet ] Evgeny Mandrikov [ godin ]
          Hide
          godin OLD - 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
          godin OLD - 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 .
          godin OLD - Evgeny Mandrikov made changes -
          Link This issue relates to SONAR-2487 [ SONAR-2487 ]
          godin OLD - Evgeny Mandrikov made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          hgomez Henri Gomez made changes -
          Project Import Wed May 27 13:41:49 CEST 2015 [ 1432726909095 ]
          henri.gomez Henri Gomez made changes -
          Project Import Thu May 28 19:38:02 UTC 2015 [ 1432841882590 ]
          freddy.mallet Freddy Mallet made changes -
          Workflow jira [ 30709 ] Default SonarSource Workflow [ 55833 ]
          freddy.mallet Freddy Mallet made changes -
          Workflow Default SonarSource Workflow [ 55833 ] Default Agile SonarSource Workflow [ 76056 ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved: