Source:
<code>private static List<FoundFailureCause> findCauses(final Collection<FailureCause> causes, final Run build, final PrintStream buildLog) { final List<FoundFailureCause> foundFailureCauseList = new ArrayList<FoundFailureCause>(); long start = System.currentTimeMillis(); THREAD_POOL_EXECUTOR.setCorePoolSize(PluginImpl.getInstance().getNrOfScanThreads()); THREAD_POOL_EXECUTOR.setMaximumPoolSize(PluginImpl.getInstance().getNrOfScanThreads()); buildLog.println("[BFA] Scanning build for known causes..."); Runnable runnable = new Runnable() { @Override public void run() { Thread.currentThread().setName("BFA-scanner-" + build.getFullDisplayName()); <START> foundFailureCauseList.addAll(findIndications(causes, build, buildLog)); <END> } }; try { THREAD_POOL_EXECUTOR.submit(runnable).get(); } catch (InterruptedException e) { buildLog.print("[BFA] was interrupted: " + e); } catch (ExecutionException e) { buildLog.print("[BFA] was interrupted: " + e); } long time = System.currentTimeMillis() - start; if (logger.isLoggable(Level.FINER)) { logger.log(Level.FINER, "[BFA] [{0}] {1}ms", new Object[] {build.getFullDisplayName(), String.valueOf(time), }); } if (!foundFailureCauseList.isEmpty()) { buildLog.println("[BFA] Found failure cause(s):"); for (FoundFailureCause foundCause : foundFailureCauseList) { if (foundCause.getCategories() == null) { buildLog.println("[BFA] " + foundCause.getName()); } else { buildLog.println("[BFA] " + foundCause.getName() + " from category " + foundCause.getCategories().get(0)); } } } else { buildLog.println("[BFA] No failure causes found"); } buildLog.println("[BFA] Done. " + TimeUnit.MILLISECONDS.toSeconds(time) + "s"); return foundFailureCauseList; }</code><technical_language>I this for single line indications good results in speed memory, this code behave in a setup MultiLineBuildLogIndications? scanning for indication a time, this delay builds alot in big setups</technical_language>

Target:
private static List<FoundFailureCause> findCauses(final Collection<FailureCause> causes, final Run build, final PrintStream buildLog) { THREAD_POOL_EXECUTOR.setCorePoolSize(PluginImpl.getInstance().getNrOfScanThreads()); THREAD_POOL_EXECUTOR.setMaximumPoolSize(PluginImpl.getInstance().getNrOfScanThreads()); buildLog.println("[BFA] Scanning build for known causes..."); long start = System.currentTimeMillis(); final List<FoundFailureCause> foundFailureCauseList = findIndications(causes, build, buildLog); long time = System.currentTimeMillis() - start; if (logger.isLoggable(Level.FINER)) { logger.log(Level.FINER, "[BFA] [{0}] {1}ms", new Object[] {build.getFullDisplayName(), String.valueOf(time), }); } if (!foundFailureCauseList.isEmpty()) { buildLog.println("[BFA] Found failure cause(s):"); for (FoundFailureCause foundCause : foundFailureCauseList) { if (foundCause.getCategories() == null) { buildLog.println("[BFA] " + foundCause.getName()); } else { buildLog.println("[BFA] " + foundCause.getName() + " from category " + foundCause.getCategories().get(0)); } } } else { buildLog.println("[BFA] No failure causes found"); } buildLog.println("[BFA] Done. " + TimeUnit.MILLISECONDS.toSeconds(time) + "s"); return foundFailureCauseList; }