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

Display exceedingly slow for large test results

    XMLWordPrintable

Details

    Description

      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.

      Attachments

        Activity

          jglick Jesse Glick added a comment -

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

          jglick 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_issue_link 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 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 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_issue_link 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 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 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
          mrcube 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.

          mrcube 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.
          mrcube 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.

          mrcube 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.
          jwazen Joey Wazen added a comment -

          Hello, 

          Any improvement on the issue ? 

          Thanks, 

          Joey

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

          People

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

            Dates

              Created:
              Updated: