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

Display exceedingly slow for large test results

      When there are a lot of test cases in a single suite, rendering the summary page is dreadfully slow. Most of the time is taken in TestObject.uniquifyName, which can be called thousands of times, each taking several msec.

          [JENKINS-15818] Display exceedingly slow for large test results

          Jesse Glick added a comment -

          Other bottlenecks: CaseResult.getPreviousResult; and getSafeName called from other threads (context menu).

          Jesse Glick added a comment - Other bottlenecks: CaseResult.getPreviousResult ; and getSafeName called from other threads (context menu).

          Code changed in jenkins
          User: Jesse Glick
          Path:
          changelog.html
          core/src/main/java/hudson/tasks/junit/CaseResult.java
          core/src/main/java/hudson/tasks/junit/ClassResult.java
          core/src/main/java/hudson/tasks/junit/PackageResult.java
          core/src/main/java/hudson/tasks/junit/SuiteResult.java
          core/src/main/java/hudson/tasks/test/TestObject.java
          http://jenkins-ci.org/commit/jenkins/734e7e01306e1696655e619d8902a7e6e98b4315
          Log:
          [FIXED JENKINS-15818] Display exceedingly slow for large test results.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: changelog.html core/src/main/java/hudson/tasks/junit/CaseResult.java core/src/main/java/hudson/tasks/junit/ClassResult.java core/src/main/java/hudson/tasks/junit/PackageResult.java core/src/main/java/hudson/tasks/junit/SuiteResult.java core/src/main/java/hudson/tasks/test/TestObject.java http://jenkins-ci.org/commit/jenkins/734e7e01306e1696655e619d8902a7e6e98b4315 Log: [FIXED JENKINS-15818] Display exceedingly slow for large test results.

          dogfood added a comment -

          Integrated in jenkins_main_trunk #2073
          [FIXED JENKINS-15818] Display exceedingly slow for large test results. (Revision 734e7e01306e1696655e619d8902a7e6e98b4315)

          Result = UNSTABLE
          Jesse Glick : 734e7e01306e1696655e619d8902a7e6e98b4315
          Files :

          • core/src/main/java/hudson/tasks/test/TestObject.java
          • core/src/main/java/hudson/tasks/junit/SuiteResult.java
          • core/src/main/java/hudson/tasks/junit/CaseResult.java
          • core/src/main/java/hudson/tasks/junit/PackageResult.java
          • changelog.html
          • core/src/main/java/hudson/tasks/junit/ClassResult.java

          dogfood added a comment - Integrated in jenkins_main_trunk #2073 [FIXED JENKINS-15818] Display exceedingly slow for large test results. (Revision 734e7e01306e1696655e619d8902a7e6e98b4315) Result = UNSTABLE Jesse Glick : 734e7e01306e1696655e619d8902a7e6e98b4315 Files : core/src/main/java/hudson/tasks/test/TestObject.java core/src/main/java/hudson/tasks/junit/SuiteResult.java core/src/main/java/hudson/tasks/junit/CaseResult.java core/src/main/java/hudson/tasks/junit/PackageResult.java changelog.html core/src/main/java/hudson/tasks/junit/ClassResult.java

          Code changed in jenkins
          User: Jesse Glick
          Path:
          test/src/test/java/hudson/tasks/junit/SuiteResultTest.java
          http://jenkins-ci.org/commit/jenkins/9e205379fb1b2a62c391ceab993e03a4a5539ec6
          Log:
          JENKINS-15818 Adding safeName fields takes a bit more heap.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: test/src/test/java/hudson/tasks/junit/SuiteResultTest.java http://jenkins-ci.org/commit/jenkins/9e205379fb1b2a62c391ceab993e03a4a5539ec6 Log: JENKINS-15818 Adding safeName fields takes a bit more heap.

          dogfood added a comment -

          Integrated in jenkins_main_trunk #2074
          JENKINS-15818 Adding safeName fields takes a bit more heap. (Revision 9e205379fb1b2a62c391ceab993e03a4a5539ec6)

          Result = SUCCESS
          Jesse Glick : 9e205379fb1b2a62c391ceab993e03a4a5539ec6
          Files :

          • test/src/test/java/hudson/tasks/junit/SuiteResultTest.java

          dogfood added a comment - Integrated in jenkins_main_trunk #2074 JENKINS-15818 Adding safeName fields takes a bit more heap. (Revision 9e205379fb1b2a62c391ceab993e03a4a5539ec6) Result = SUCCESS Jesse Glick : 9e205379fb1b2a62c391ceab993e03a4a5539ec6 Files : test/src/test/java/hudson/tasks/junit/SuiteResultTest.java

          Kees Kuip added a comment - - edited

          The TestObject.uniquifyName still has major performance issues.
          The AppTest.java doesn't test the original problem (test with the same name) and therefore you might think that this issue is solved. I slightly changed the AppTest.java in order to see the problem. (I will attach the new AppTest.java to this bug)

          The problem with the old AppTest.java is that all testnames are different and this results in a bit of a fastpath in uniquifyName.

          How To Reproduce:

          Test the new AppTest.java
          Go the summary page of the build.
          A number of tests will be failed now.
          Click on a failed test (not the first one!) to see the detail.

          The last click will result in 100%cpu for a very long time.

          Kees Kuip added a comment - - edited The TestObject.uniquifyName still has major performance issues. The AppTest.java doesn't test the original problem (test with the same name) and therefore you might think that this issue is solved. I slightly changed the AppTest.java in order to see the problem. (I will attach the new AppTest.java to this bug) The problem with the old AppTest.java is that all testnames are different and this results in a bit of a fastpath in uniquifyName. How To Reproduce: Test the new AppTest.java Go the summary page of the build. A number of tests will be failed now. Click on a failed test (not the first one!) to see the detail. The last click will result in 100%cpu for a very long time.

          Kees Kuip added a comment - - edited

          I adjusted the code myself. We have no need for TestObject.uniquifyName(..) and I removed that code. The navigationproblems are over now.

          Kees Kuip added a comment - - edited I adjusted the code myself. We have no need for TestObject.uniquifyName(..) and I removed that code. The navigationproblems are over now.

          Joey Wazen added a comment -

          Hello, 

          Any improvement on the issue ? 

          Thanks, 

          Joey

          Joey Wazen added a comment - Hello,  Any improvement on the issue ?  Thanks,  Joey

            Unassigned Unassigned
            jglick Jesse Glick
            Votes:
            6 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated: