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

Build health computed twice per job

    XMLWordPrintable

Details

    Description

      buildHealth.jelly asks for both job.buildHealth and job.buildHealthReports, causing Job/Folder.getBuildHealthReports to be called twice just to render a single table cell. I would guess that the performance problem comes in the first call, and the second call is mostly working off a hot cache, but if you are under memory pressure it is always possible that garbage collection has to run between the two calls and so work is wasted. I see no need to call job.buildHealth; should suffice to assume that the implementation is simply going to be to look up the first element in job.buildHealthReports (as it is in both Job and Folder).

      Attachments

        Issue Links

          Activity

            jglick Jesse Glick added a comment -

            Worse, sometimes job.buildHealthReports is called a third time.

            jglick Jesse Glick added a comment - Worse, sometimes job.buildHealthReports is called a third time.

            Code changed in jenkins
            User: Jesse Glick
            Path:
            changelog.html
            core/src/main/resources/lib/hudson/buildHealth.jelly
            http://jenkins-ci.org/commit/jenkins/f463abbe53488747725ea2e45dfc4a98ada02b8e
            Log:
            [FIXED JENKINS-25074] Make sure to call Job.getBuildHealthReports just once per t:buildHealth render.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: changelog.html core/src/main/resources/lib/hudson/buildHealth.jelly http://jenkins-ci.org/commit/jenkins/f463abbe53488747725ea2e45dfc4a98ada02b8e Log: [FIXED JENKINS-25074] Make sure to call Job.getBuildHealthReports just once per t:buildHealth render.
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #3731
            [FIXED JENKINS-25074] Make sure to call Job.getBuildHealthReports just once per t:buildHealth render. (Revision f463abbe53488747725ea2e45dfc4a98ada02b8e)

            Result = SUCCESS
            Jesse Glick : f463abbe53488747725ea2e45dfc4a98ada02b8e
            Files :

            • changelog.html
            • core/src/main/resources/lib/hudson/buildHealth.jelly
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #3731 [FIXED JENKINS-25074] Make sure to call Job.getBuildHealthReports just once per t:buildHealth render. (Revision f463abbe53488747725ea2e45dfc4a98ada02b8e) Result = SUCCESS Jesse Glick : f463abbe53488747725ea2e45dfc4a98ada02b8e Files : changelog.html core/src/main/resources/lib/hudson/buildHealth.jelly

            could you please add this to LTS?

            imakowski Ireneusz Makowski added a comment - could you please add this to LTS?

            Code changed in jenkins
            User: Jesse Glick
            Path:
            core/src/main/resources/lib/hudson/buildHealth.jelly
            http://jenkins-ci.org/commit/jenkins/4629122c5572be5bb1bad4183379a3374b308f6d
            Log:
            [FIXED JENKINS-25074] Make sure to call Job.getBuildHealthReports just once per t:buildHealth render.
            (cherry picked from commit f463abbe53488747725ea2e45dfc4a98ada02b8e)

            Conflicts:
            changelog.html

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: core/src/main/resources/lib/hudson/buildHealth.jelly http://jenkins-ci.org/commit/jenkins/4629122c5572be5bb1bad4183379a3374b308f6d Log: [FIXED JENKINS-25074] Make sure to call Job.getBuildHealthReports just once per t:buildHealth render. (cherry picked from commit f463abbe53488747725ea2e45dfc4a98ada02b8e) Conflicts: changelog.html
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #4292
            [FIXED JENKINS-25074] Make sure to call Job.getBuildHealthReports just once per t:buildHealth render. (Revision 4629122c5572be5bb1bad4183379a3374b308f6d)

            Result = UNSTABLE
            ogondza : 4629122c5572be5bb1bad4183379a3374b308f6d
            Files :

            • core/src/main/resources/lib/hudson/buildHealth.jelly
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #4292 [FIXED JENKINS-25074] Make sure to call Job.getBuildHealthReports just once per t:buildHealth render. (Revision 4629122c5572be5bb1bad4183379a3374b308f6d) Result = UNSTABLE ogondza : 4629122c5572be5bb1bad4183379a3374b308f6d Files : core/src/main/resources/lib/hudson/buildHealth.jelly

            People

              jglick Jesse Glick
              jglick Jesse Glick
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: