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

Slow FindBugsPlugin.start is wasted


    • Similar Issues:


      While waiting for a Jenkins instance to start up, which was quite slow, on a whim I took a thread dump. I found that Jenkins was initializing the FindBugs plugin; specifically FindBugsPlugin.start was calling FindBugsMessages.initialize, which apparently loads some several thousand line XML files. Note that this was a virgin $JENKINS_HOME—no jobs, no FB publisher configured.

      This is very bad. Plugins should avoid doing work in initializers unless they cannot avoid it, especially expensive work like this. Why not move this initialization to FindBugsMessages.getInstance, so that it is done if and when someone is actually using FindBugs?

      Also start seems to be setting the global org.xml.sax.driver, which it must not do. (It purports to restore the previous value, but fails to use a finally block for this, and does not consider the normal case that no such system property was set to begin with.)



          jglick Jesse Glick created issue -
          scm_issue_link SCM/JIRA link daemon made changes -
          Field Original Value New Value
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 152685 ] JNJira + In-Review [ 194315 ]


            • Assignee:
              drulli Ulli Hafner
              jglick Jesse Glick
            • Votes:
              0 Vote for this issue
              4 Start watching this issue


              • Created: