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

Slow FindBugsPlugin.start is wasted

    Details

    • Similar Issues:

      Description

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

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: