Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-3597

Improve cobertura plugin memory usage when drawing trend graphs

    XMLWordPrintable

    Details

    • Type: Patch
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Won't Fix
    • Component/s: cobertura-plugin
    • Labels:
      None
    • Environment:
      Platform: All, OS: All
    • Similar Issues:

      Description

      The majority of the memory usage of the Cobertura plugin is currently in the
      "paint" object. However, the "paint" object is only used during initial
      publishing, not during subsequent trend change generation or metrics display.

      This patch pulls the "paint" support out of CoverageResult into a subclass,
      PaintedCoverageResult. The parser is modified to return the basic
      CoverageResult by default, and adds methods to request a PaintedCoverageResult
      (which are used by the publishers).

      After this patch, the Cobertura plugin will still be slow when large coverage
      files and/or lots of builds are in play, but it should throw OutOfMemoryErrors
      on trend graph generation less commonly.

        Attachments

          Issue Links

            Activity

            Hide
            davidmc24 davidmc24 added a comment -

            This patch doesn't work as intended, and the approach used can't easily be fixed. gliptak has committed a change that may help somewhat, though.

            http://issues.jenkins-ci.org/browse/JENKINS-3597

            Show
            davidmc24 davidmc24 added a comment - This patch doesn't work as intended, and the approach used can't easily be fixed. gliptak has committed a change that may help somewhat, though. http://issues.jenkins-ci.org/browse/JENKINS-3597
            Hide
            mdonohue mdonohue added a comment -
                • Issue 4795 has been marked as a duplicate of this issue. ***
            Show
            mdonohue mdonohue added a comment - Issue 4795 has been marked as a duplicate of this issue. ***
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in hudson
            User: : davidmc24
            Path:
            trunk/hudson/plugins/cobertura/src/main/java/hudson/plugins/cobertura/CoberturaCoverageParser.java
            trunk/hudson/plugins/cobertura/src/main/java/hudson/plugins/cobertura/CoberturaPublisher.java
            trunk/hudson/plugins/cobertura/src/main/java/hudson/plugins/cobertura/MavenCoberturaPublisher.java
            trunk/hudson/plugins/cobertura/src/main/java/hudson/plugins/cobertura/targets/CoverageResult.java
            trunk/hudson/plugins/cobertura/src/test/java/hudson/plugins/cobertura/CoberturaCoverageParserTest.java
            http://fisheye4.cenqua.com/changelog/hudson/?cs=18797
            Log:
            JENKINS-3597 Back out the changes to attempt to reduce Cobertura plugin memory usage, since they had unintended side-effects. Should be included in the next release of the plugin (0.8.8).

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : davidmc24 Path: trunk/hudson/plugins/cobertura/src/main/java/hudson/plugins/cobertura/CoberturaCoverageParser.java trunk/hudson/plugins/cobertura/src/main/java/hudson/plugins/cobertura/CoberturaPublisher.java trunk/hudson/plugins/cobertura/src/main/java/hudson/plugins/cobertura/MavenCoberturaPublisher.java trunk/hudson/plugins/cobertura/src/main/java/hudson/plugins/cobertura/targets/CoverageResult.java trunk/hudson/plugins/cobertura/src/test/java/hudson/plugins/cobertura/CoberturaCoverageParserTest.java http://fisheye4.cenqua.com/changelog/hudson/?cs=18797 Log: JENKINS-3597 Back out the changes to attempt to reduce Cobertura plugin memory usage, since they had unintended side-effects. Should be included in the next release of the plugin (0.8.8).
            Hide
            davidmc24 davidmc24 added a comment -

            This "fix" breaks source code highlighting. Further analysis needed. For now, back out the change.

            Show
            davidmc24 davidmc24 added a comment - This "fix" breaks source code highlighting. Further analysis needed. For now, back out the change.
            Hide
            davidmc24 davidmc24 added a comment -

            Included in cobertura plugin version 0.8.7, which is now released.

            Show
            davidmc24 davidmc24 added a comment - Included in cobertura plugin version 0.8.7, which is now released.

              People

              • Assignee:
                davidmc24 davidmc24
                Reporter:
                davidmc24 davidmc24
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: