You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@creadur.apache.org by "Andrew Gaul (JIRA)" <ji...@apache.org> on 2014/06/10 23:13:01 UTC
[jira] [Created] (RAT-162) CDDL1License.matches slow with large
inputs
Andrew Gaul created RAT-162:
-------------------------------
Summary: CDDL1License.matches slow with large inputs
Key: RAT-162
URL: https://issues.apache.org/jira/browse/RAT-162
Project: Apache Rat
Issue Type: Improvement
Affects Versions: 0.10
Reporter: Andrew Gaul
Fix For: 0.11
Attachments: RAT-162.patch
mvn apache-rat:check runs slowly with large files. I accidentally had a 100 MB log file which took over a minute to for RAT to parse. The stack trace included:
{noformat}
"main" prio=10 tid=0x00007f322800a000 nid=0x6730 runnable [0x00007f3230235000]
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.Pattern$Start.match(Pattern.java:3408)
at java.util.regex.Matcher.search(Matcher.java:1199)
at java.util.regex.Matcher.find(Matcher.java:592)
at org.apache.rat.analysis.license.CDDL1License.matches(CDDL1License.java:65)
at org.apache.rat.analysis.license.SimplePatternBasedLicense.match(SimplePatternBasedLicense.java:69)
{noformat}
I attached a patch which caches the Patterns in CDDL1License works around this issue.
--
This message was sent by Atlassian JIRA
(v6.2#6252)