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

Heavy memory usage loading project with many test results

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • junit-plugin
    • None
    • Platform: All, OS: All

      http://deadlock.netbeans.org/hudson/job/NB-Core-Build/lastSuccessfulBuild/testReport/

      has 5.5k tests. I recently got an OOME from the server and examined a heap dump.
      Among many other problems, I found that there were hundreds of String's such as
      "testSuite", "failures", etc. I am guessing these are the result of parsing
      TEST-*.xml result files without using string interning on element/attribute
      names. Suggest:

      Index: main/core/src/main/java/hudson/tasks/junit/SuiteResult.java
      ===================================================================
      — main/core/src/main/java/hudson/tasks/junit/SuiteResult.java (revision 11651)
      +++ main/core/src/main/java/hudson/tasks/junit/SuiteResult.java (working copy)
      @@ -56,6 +56,7 @@

      // parse into DOM
      SAXReader saxReader = new SAXReader();
      + saxReader.setStringInternEnabled(true);
      // install EntityResolver for resolving DTDs, which are in files
      created by TestNG.
      // (see
      https://hudson.dev.java.net/servlets/ReadMsg?listName=users&msgNo=5530)
      XMLEntityResolver resolver = new XMLEntityResolver();

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

              Created:
              Updated:
              Resolved: