Setup is the same as in JENKINS-23945 except use the testng branch of the sample project, and configure the TestNG plugin's publisher with **/target/surefire-reports/testng-results.xml. Even with the fix of JENKINS-23945 applied to Jenkins core, after displaying the job index page all builds are loaded:

      ... FINER hudson.model.Run
      reload lazy-load-perf #71 @...
      ... FINEST hudson.model.RunMap
      Loaded lazy-load-perf #71
      hudson.model.RunMap$ThisIsHowItsLoaded
      	at hudson.model.RunMap.retrieve(RunMap.java:221)
      	at hudson.model.RunMap.retrieve(RunMap.java:56)
      	at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:688)
      	at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:650)
      	at jenkins.model.lazy.AbstractLazyLoadRunMap.search(AbstractLazyLoadRunMap.java:382)
      	at jenkins.model.lazy.LazyLoadRunMapEntrySet$1.next(LazyLoadRunMapEntrySet.java:70)
      	at jenkins.model.lazy.LazyLoadRunMapEntrySet$1.next(LazyLoadRunMapEntrySet.java:59)
      	at java.util.AbstractMap$2$1.next(AbstractMap.java:385)
      	at hudson.util.RunList.size(RunList.java:108)
      	at hudson.plugins.testng.TestNGProjectAction.newGraphNotNeeded(TestNGProjectAction.java:141)
      	at hudson.plugins.testng.TestNGProjectAction.doGraph(TestNGProjectAction.java:114)
      	at ...
      

      The problem is TestNGProjectAction.newGraphNotNeeded calling RunList.size, which is deprecated since it forces all builds to be loaded immediately.

          [JENKINS-24176] Test result trend breaks lazy-loading

          Jesse Glick created issue -
          Jesse Glick made changes -
          Link New: This issue is blocking JENKINS-23945 [ JENKINS-23945 ]

          Jesse Glick added a comment -

          Prevents JENKINS-23945 fix from being useful when the TestNG plugin is used instead of the JUnit publisher.

          Jesse Glick added a comment - Prevents JENKINS-23945 fix from being useful when the TestNG plugin is used instead of the JUnit publisher.

          Jesse Glick added a comment -

          “Introduced by” the fix for JENKINS-9839, though there was no lazy-loading at the time this fix was made so it was not manifested as a regression at the time.

          Jesse Glick added a comment - “Introduced by” the fix for JENKINS-9839 , though there was no lazy-loading at the time this fix was made so it was not manifested as a regression at the time.
          Jesse Glick made changes -
          Link New: This issue is blocking JENKINS-9839 [ JENKINS-9839 ]
          Jesse Glick made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]

          Jesse Glick added a comment -

          Experimenting with reverting the fix of JENKINS-9839. While that issue might be an annoyance in unusual cases, it is minor compared to the lazy-loading problem, which can bring a large Jenkins installation to a grinding halt—just because someone opened a job index page in a browser. Now the next problem appears:

          hudson.model.RunMap$ThisIsHowItsLoaded
          	at hudson.model.RunMap.retrieve(RunMap.java:221)
          	at hudson.model.RunMap.retrieve(RunMap.java:56)
          	at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:688)
          	at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:650)
          	at jenkins.model.lazy.AbstractLazyLoadRunMap.search(AbstractLazyLoadRunMap.java:382)
          	at jenkins.model.lazy.LazyBuildMixIn$RunMixIn.getPreviousBuild(LazyBuildMixIn.java:366)
          	at hudson.model.AbstractBuild.getPreviousBuild(AbstractBuild.java:198)
          	at hudson.model.AbstractBuild.getPreviousBuild(AbstractBuild.java:106)
          	at hudson.model.Run.getPreviousCompletedBuild(Run.java:819)
          	at hudson.plugins.testng.TestNGProjectAction.populateDataSetBuilder(TestNGProjectAction.java:187)
          	at hudson.plugins.testng.TestNGProjectAction.doGraph(TestNGProjectAction.java:112)
          	at …
          

          Jesse Glick added a comment - Experimenting with reverting the fix of JENKINS-9839 . While that issue might be an annoyance in unusual cases, it is minor compared to the lazy-loading problem, which can bring a large Jenkins installation to a grinding halt—just because someone opened a job index page in a browser. Now the next problem appears: hudson.model.RunMap$ThisIsHowItsLoaded at hudson.model.RunMap.retrieve(RunMap.java:221) at hudson.model.RunMap.retrieve(RunMap.java:56) at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:688) at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:650) at jenkins.model.lazy.AbstractLazyLoadRunMap.search(AbstractLazyLoadRunMap.java:382) at jenkins.model.lazy.LazyBuildMixIn$RunMixIn.getPreviousBuild(LazyBuildMixIn.java:366) at hudson.model.AbstractBuild.getPreviousBuild(AbstractBuild.java:198) at hudson.model.AbstractBuild.getPreviousBuild(AbstractBuild.java:106) at hudson.model.Run.getPreviousCompletedBuild(Run.java:819) at hudson.plugins.testng.TestNGProjectAction.populateDataSetBuilder(TestNGProjectAction.java:187) at hudson.plugins.testng.TestNGProjectAction.doGraph(TestNGProjectAction.java:112) at …

          Jesse Glick added a comment -

          This latter problem is essentially identical to JENKINS-23945 and should be solvable in the same way: by declining to display results for builds which have not yet been loaded for some other reason (such as the BuildHistoryWidget).

          Jesse Glick added a comment - This latter problem is essentially identical to JENKINS-23945 and should be solvable in the same way: by declining to display results for builds which have not yet been loaded for some other reason (such as the BuildHistoryWidget ).

          Jesse Glick added a comment -

          Note that MethodResult.populateDataSetBuilder also searches backward in history, but limited to at most 10 builds, so it is not much of a problem.

          Loaded lazy-load-perf #119 in Handling GET /jenkins/job/lazy-load-perf/129/testngreports/test/SomeTest/test1/graph : btpool0-5
          hudson.model.RunMap$ThisIsHowItsLoaded
          	at hudson.model.RunMap.retrieve(RunMap.java:221)
          	at hudson.model.RunMap.retrieve(RunMap.java:56)
          	at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:688)
          	at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:650)
          	at jenkins.model.lazy.AbstractLazyLoadRunMap.search(AbstractLazyLoadRunMap.java:382)
          	at jenkins.model.lazy.LazyBuildMixIn$RunMixIn.getPreviousBuild(LazyBuildMixIn.java:366)
          	at hudson.model.AbstractBuild.getPreviousBuild(AbstractBuild.java:198)
          	at hudson.plugins.testng.results.MethodResult.populateDataSetBuilder(MethodResult.java:305)
          	at hudson.plugins.testng.results.MethodResult.getGraph(MethodResult.java:276)
          	at hudson.plugins.testng.results.MethodResult.doGraph(MethodResult.java:238)
          	at …
          

          Jesse Glick added a comment - Note that MethodResult.populateDataSetBuilder also searches backward in history, but limited to at most 10 builds, so it is not much of a problem. Loaded lazy-load-perf #119 in Handling GET /jenkins/job/lazy-load-perf/129/testngreports/test/SomeTest/test1/graph : btpool0-5 hudson.model.RunMap$ThisIsHowItsLoaded at hudson.model.RunMap.retrieve(RunMap.java:221) at hudson.model.RunMap.retrieve(RunMap.java:56) at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:688) at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:650) at jenkins.model.lazy.AbstractLazyLoadRunMap.search(AbstractLazyLoadRunMap.java:382) at jenkins.model.lazy.LazyBuildMixIn$RunMixIn.getPreviousBuild(LazyBuildMixIn.java:366) at hudson.model.AbstractBuild.getPreviousBuild(AbstractBuild.java:198) at hudson.plugins.testng.results.MethodResult.populateDataSetBuilder(MethodResult.java:305) at hudson.plugins.testng.results.MethodResult.getGraph(MethodResult.java:276) at hudson.plugins.testng.results.MethodResult.doGraph(MethodResult.java:238) at …

          Jesse Glick added a comment -

          Filed PR 13 with proposed fix.

          Jesse Glick added a comment - Filed PR 13 with proposed fix.

            nullin Nalin Makar
            jglick Jesse Glick
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: