creadur-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Gaul (JIRA)" <>
Subject [jira] [Created] (RAT-162) CDDL1License.matches slow with large inputs
Date Tue, 10 Jun 2014 21:13:01 GMT
Andrew Gaul created RAT-162:

             Summary: CDDL1License.matches slow with large inputs
                 Key: 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: 

"main" prio=10 tid=0x00007f322800a000 nid=0x6730 runnable [0x00007f3230235000]
   java.lang.Thread.State: RUNNABLE
        at java.util.regex.Pattern$Curly.match0(
        at java.util.regex.Pattern$Curly.match(
        at java.util.regex.Pattern$Start.match(
        at java.util.regex.Matcher.find(
        at org.apache.rat.analysis.license.CDDL1License.matches(
        at org.apache.rat.analysis.license.SimplePatternBasedLicense.match(

I attached a patch which caches the Patterns in CDDL1License works around this issue.

This message was sent by Atlassian JIRA

View raw message