Return-Path: X-Original-To: apmail-creadur-dev-archive@www.apache.org Delivered-To: apmail-creadur-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 87E9DDE9F for ; Sun, 19 May 2013 12:35:18 +0000 (UTC) Received: (qmail 49677 invoked by uid 500); 19 May 2013 12:35:18 -0000 Delivered-To: apmail-creadur-dev-archive@creadur.apache.org Received: (qmail 49563 invoked by uid 500); 19 May 2013 12:35:15 -0000 Mailing-List: contact dev-help@creadur.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@creadur.apache.org Delivered-To: mailing list dev@creadur.apache.org Received: (qmail 49546 invoked by uid 99); 19 May 2013 12:35:15 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 19 May 2013 12:35:15 +0000 Date: Sun, 19 May 2013 12:35:15 +0000 (UTC) From: "Sebb (JIRA)" To: dev@creadur.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Reopened] (RAT-138) RAT runs very slowly on some input MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/RAT-138?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sebb reopened RAT-138: ---------------------- Same problem applies to AppliedApacheSoftwareLicense20. This detects the copyright header and then buffers everything until it matches the rest of the license. This could use the same approach as the FullText case, however that would allow the Copyright and body to be widely separated, which is not ideal. But at least it would avoid the long run time. > RAT runs very slowly on some input > ---------------------------------- > > Key: RAT-138 > URL: https://issues.apache.org/jira/browse/RAT-138 > Project: Apache Rat > Issue Type: Bug > Components: engine > Affects Versions: 0.8, 0.9 > Reporter: Sebb > Labels: perfomance, regression > Fix For: 0.10 > > > Commons IO discovered that mvn site was spending a lot of time running RAT 0.9. Reverting to 0.8 fixes the problem. > Turns out that certain files seem to cause RAT to chew CPU in the Pattern.matcher; here is a sample stack trace from a thread dump: > "main" prio=6 tid=0x003c8c00 nid=0xa4c runnable [0x00a5e000] > java.lang.Thread.State: RUNNABLE > at java.util.regex.Pattern$Curly.match0(Pattern.java:4166) > at java.util.regex.Pattern$Curly.match(Pattern.java:4132) > at java.util.regex.Matcher.match(Matcher.java:1221) > at java.util.regex.Matcher.matches(Matcher.java:559) > at org.apache.rat.analysis.license.FullTextMatchingLicense.match(FullTextMatchingLicense.java:79) > at org.apache.rat.analysis.util.HeaderMatcherMultiplexer.match(HeaderMatcherMultiplexer.java:42) > at org.apache.rat.analysis.HeaderCheckWorker.readLine(HeaderCheckWorker.java:113) > at org.apache.rat.analysis.HeaderCheckWorker.read(HeaderCheckWorker.java:84) > at org.apache.rat.analysis.DocumentHeaderAnalyser.analyse(DocumentHeaderAnalyser.java:43) > at org.apache.rat.analysis.DefaultAnalyserFactory$DefaultAnalyser.analyse(DefaultAnalyserFactory.java:60) > at org.apache.rat.document.impl.util.DocumentAnalyserMultiplexer.analyse(DocumentAnalyserMultiplexer.java:37) > at org.apache.rat.report.claim.util.ClaimReporterMultiplexer.report(ClaimReporterMultiplexer.java:42) > at org.apache.rat.mp.FilesReportable.run(FilesReportable.java:68) > at org.apache.rat.Report.report(Report.java:393) > at org.apache.rat.Report.report(Report.java:373) > at org.apache.rat.mp.AbstractRatMojo.createReport(AbstractRatMojo.java:462) > at org.apache.rat.mp.RatReportMojo.createReport(RatReportMojo.java:148) > at org.apache.rat.mp.RatReportMojo.generate(RatReportMojo.java:310) > at org.apache.rat.mp.RatReportMojo.execute(RatReportMojo.java:210) > I assume there must be a problem with one of the REs which is triggering lots of backtracking when applied to files under site-content/, which is a working copy of: > https://svn.apache.org/repos/infra/websites/production/commons/content/proper/commons-io > Last Changed Rev: 861378 > This directory should not have been included in the RAT scan, but the files don't cause problems for RAT 0.8. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira