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

Jenkins build page slow to load with large jacoco reports

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • jacoco-plugin
    • None
    • Jenkins 2.7.1, Jacoco-plugin 2.2.0

      If a Jenkins job has a very large code coverage report (say 10,000+ class/source files) it causes the build page in the UI to load very slowly when using the jacoco code coverage plugin. I believe this is because the entire report is being read into memory before the page can load.

      The build page only loads an overall coverage summary with 6 pieces of data. If this summary was instead saved/cached on the filesystem and used for this page the entire report would not have to be loaded.

      The coverage report would obviously have to be loaded if the user goes into the coverage report UI but that is unpreventable. If however the user is looking up information about the build and does not desire full details of code coverage there is no reason the whole report needs to be read into memory.

      21312msec elapsed in Handling GET /view/myview/view/Main/job/myjob/40/ from 1.1.1.1 : RequestHandlerThread[#2718] AbstractBuild/index.jelly JacocoBuildAction/summary.jelly
          java.io.WinNTFileSystem.list(Native Method)
          java.io.File.list(File.java:1122)
          org.codehaus.plexus.util.DirectoryScanner.scandir(DirectoryScanner.java:414)
          org.codehaus.plexus.util.DirectoryScanner.scandir(DirectoryScanner.java:526)
          org.codehaus.plexus.util.DirectoryScanner.scandir(DirectoryScanner.java:526)
          org.codehaus.plexus.util.DirectoryScanner.scandir(DirectoryScanner.java:526)
          org.codehaus.plexus.util.DirectoryScanner.scandir(DirectoryScanner.java:526)
          org.codehaus.plexus.util.DirectoryScanner.scandir(DirectoryScanner.java:526)
          org.codehaus.plexus.util.DirectoryScanner.scandir(DirectoryScanner.java:526)
          org.codehaus.plexus.util.DirectoryScanner.scan(DirectoryScanner.java:350)
          org.codehaus.plexus.util.FileUtils.getFileAndDirectoryNames(FileUtils.java:1942)
          org.codehaus.plexus.util.FileUtils.getFileNames(FileUtils.java:1869)
          org.codehaus.plexus.util.FileUtils.getFileNames(FileUtils.java:1851)
          org.codehaus.plexus.util.FileUtils.getFiles(FileUtils.java:1825)
          org.codehaus.plexus.util.FileUtils.getFiles(FileUtils.java:1808)
          hudson.plugins.jacoco.ExecutionFileLoader.analyzeStructure(ExecutionFileLoader.java:134)
          hudson.plugins.jacoco.ExecutionFileLoader.loadBundleCoverage(ExecutionFileLoader.java:146)
          hudson.plugins.jacoco.JacocoReportDir.parse(JacocoReportDir.java:101)
          hudson.plugins.jacoco.JacocoBuildAction.getResult(JacocoBuildAction.java:226)
          hudson.plugins.jacoco.JacocoBuildAction.getCoverageRatios(JacocoBuildAction.java:246)
          sun.reflect.GeneratedMethodAccessor2235.invoke(Unknown Source)
          sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          java.lang.reflect.Method.invoke(Method.java:498)
          org.apache.commons.jexl.util.PropertyExecutor.execute(PropertyExecutor.java:125)
          org.apache.commons.jexl.util.introspection.UberspectImpl$VelGetterImpl.invoke(UberspectImpl.java:314)
          org.apache.commons.jexl.parser.ASTArrayAccess.evaluateExpr(ASTArrayAccess.java:185)
          org.apache.commons.jexl.parser.ASTIdentifier.execute(ASTIdentifier.java:75)
          org.apache.commons.jexl.parser.ASTReference.execute(ASTReference.java:83)
          org.apache.commons.jexl.parser.ASTReference.value(ASTReference.java:57)
          org.apache.commons.jexl.parser.ASTReferenceExpression.value(ASTReferenceExpression.java:51)
          org.apache.commons.jexl.ExpressionImpl.evaluate(ExpressionImpl.java:80)
          hudson.ExpressionFactory2$JexlExpression.evaluate(ExpressionFactory2.java:74)
          org.apache.commons.jelly.expression.ExpressionSupport.evaluateRecurse(ExpressionSupport.java:61)
          org.apache.commons.jelly.expression.ExpressionSupport.evaluateAsIterator(ExpressionSupport.java:94)
          org.apache.commons.jelly.tags.core.ForEachTag.doTag(ForEachTag.java:89)
          org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
          org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
          org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
          org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99)
          org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
          org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
          org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
          org.apache.commons.jelly.tags.core.OtherwiseTag.doTag(OtherwiseTag.java:41)
          org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
          org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
          org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
          org.apache.commons.jelly.tags.core.ChooseTag.doTag(ChooseTag.java:38)
          org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
          org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
          org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
          org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
          org.apache.commons.jelly.tags.core.CoreTagLibrary$1.run(CoreTagLibrary.java:98)
          org.apache.commons.jelly.tags.core.CoreTagLibrary$1.run(CoreTagLibrary.java:98)
          org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
          org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
          org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)
          org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
          org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
          org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:95)
          org.kohsuke.stapler.jelly.IncludeTag.doTag(IncludeTag.java:147)
          org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
          org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
          org.apache.commons.jelly.tags.core.ForEachTag.doTag(ForEachTag.java:150)
          org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
          org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
          org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
          org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
          org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99)
          org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
          org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
          org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
          org.apache.commons.jelly.tags.core.CoreTagLibrary$1.run(CoreTagLibrary.java:98)
          org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
          org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
          org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)
          org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
          org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99)
          org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
          org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
          org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
          org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
          org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
          org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
          org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
          org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
          org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
          org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
          org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
          org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
          org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)
          org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
          org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:95)
          org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:63)
          org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:53)
          org.kohsuke.stapler.jelly.JellyClassTearOff.serveIndexJelly(JellyClassTearOff.java:112)
          org.kohsuke.stapler.jelly.JellyFacet.handleIndexRequest(JellyFacet.java:127)
          org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:735)
          org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
          org.kohsuke.stapler.MetaClass$11.dispatch(MetaClass.java:380)
          org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
          org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
          org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:233)
          org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
          org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
          org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
          org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:233)
          org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
          org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
          org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
          org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:233)
          org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
          org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
          org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
          org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
          org.kohsuke.stapler.Stapler.service(Stapler.java:238)
          javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
          org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
          org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
          hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135)
          com.cloudbees.jenkins.support.slowrequest.SlowRequestFilter.doFilter(SlowRequestFilter.java:38)
          hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
          com.smartcodeltd.jenkinsci.plugin.assetbundler.filters.LessCSS.doFilter(LessCSS.java:46)
          hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
          net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:198)
          net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:176)
          net.bull.javamelody.PluginMonitoringFilter.doFilter(PluginMonitoringFilter.java:85)
          org.jvnet.hudson.plugins.monitoring.HudsonMonitoringFilter.doFilter(HudsonMonitoringFilter.java:99)
          hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
          jenkins.metrics.impl.MetricsFilter.doFilter(MetricsFilter.java:117)
          hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
          hudson.plugins.greenballs.GreenBallFilter.doFilter(GreenBallFilter.java:59)
          hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
          hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:126)
          org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
          hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:49)
          org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
          hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
          hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
          hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
          jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
          hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
          org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
          hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
          org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
          hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
          org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
          hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
          jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)
          hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
          org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
          hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
          hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
          hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
          hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
          org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
          org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
          org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
          hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
          org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
          org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
          org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
          org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
          org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
          org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:553)
          org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
          org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
          org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
          org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
          org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
          org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
          org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
          org.eclipse.jetty.server.Server.handle(Server.java:499)
          org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
          org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
          org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
          winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
          java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
          java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
          java.lang.Thread.run(Thread.java:745)
      "Handling GET /view/CA/view/Main/job/CA_integration_2017_jul_val_CI/40/ from 10.49.161.33 : RequestHandlerThread[#2718] AbstractBuild/index.jelly JacocoBuildAction/summary.jelly" Id=842412 RUNNABLE (in native)
      	at java.io.WinNTFileSystem.list(Native Method)
      	at java.io.File.list(File.java:1122)
      	at org.codehaus.plexus.util.DirectoryScanner.scandir(DirectoryScanner.java:414)
      	at org.codehaus.plexus.util.DirectoryScanner.scandir(DirectoryScanner.java:526)
      	at org.codehaus.plexus.util.DirectoryScanner.scandir(DirectoryScanner.java:526)
      	at org.codehaus.plexus.util.DirectoryScanner.scandir(DirectoryScanner.java:526)
      	at org.codehaus.plexus.util.DirectoryScanner.scandir(DirectoryScanner.java:526)
      	at org.codehaus.plexus.util.DirectoryScanner.scandir(DirectoryScanner.java:526)
      

            centic centic
            mrichar2 Mark R
            Votes:
            6 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: