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

UberClassLoader does not cache negative results

XMLWordPrintable

      Running GroovyShell.parse, common as part of form validation for plugins offering Groovy scripting, is unnecessarily slow:

      java.lang.Thread.State: RUNNABLE
          at java.lang.Throwable.fillInStackTrace(Native Method)
          - locked <0x000000078fc42f48> (a java.lang.ClassNotFoundException)
          at java.lang.Throwable.<init>(Throwable.java:218)
          at java.lang.Exception.<init>(Exception.java:59)
          at java.lang.ClassNotFoundException.<init>(ClassNotFoundException.java:65)
          at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1375)
          at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1325)
          at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at jenkins.ClassLoaderReflectionToolkit.invoke(ClassLoaderReflectionToolkit.java:44)
          at jenkins.ClassLoaderReflectionToolkit._findClass(ClassLoaderReflectionToolkit.java:86)
          - locked <...> (a hudson.ClassicPluginStrategy$AntClassLoader2)
          at hudson.PluginManager$UberClassLoader.findClass(PluginManager.java:1042)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
          - locked <...> (a hudson.PluginManager$UberClassLoader)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:295)
          - locked <...> (a groovy.lang.GroovyClassLoader)
          at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:692)
          at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:560)
          at org.codehaus.groovy.control.ClassNodeResolver.tryAsLoaderClassOrScript(ClassNodeResolver.java:183)
          at ...
          at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:281)
          - locked <...> (a java.util.HashMap)
          at groovy.lang.GroovyShell.parseClass(GroovyShell.java:731)
          at groovy.lang.GroovyShell.parse(GroovyShell.java:743)
          at groovy.lang.GroovyShell.parse(GroovyShell.java:770)
      

      Should cache negative class loads, since these are common when compiling Groovy at least.

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

              Created:
              Updated:
              Resolved: