[
https://issues.apache.org/jira/browse/RAT-174?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Chris Burroughs updated RAT-174:
--------------------------------
Attachment: r174.v1.patch
Replace expensive regex patterns with simple text checks
With this change `apache-rat:rat` is approxiatly the same speed with and
without CDDL1License checks enabled instead of being an order of magnitude
slower.
Note: When developing I noticed that Illumos (the most prominent CDDL project I
am aware of) uses a slightly different string than what was in the unit tests.
The unit tests all pass, but this is a behavior change. For example some
unrelated text and a mention of `https://oss.oracle.com/licenses/CDDL` would no
longer match. I don't have enough familiarty with CDDL users to know if even
wider variation is common.
> CDDL1License still very slow
> ----------------------------
>
> Key: RAT-174
> URL: https://issues.apache.org/jira/browse/RAT-174
> Project: Apache Rat
> Issue Type: Bug
> Affects Versions: 0.11
> Reporter: Chris Burroughs
> Attachments: r174.v1.patch
>
>
> This is on a laptop, but I think the disparity is large enough that it's
> sufficient test. With a moderate sized java project [1] `mvn apache-rat:rat`
> takes over 6 minutes. With `CDDL1License.matches` commented out it takes
> under 20 seconds.
> See also RAT-162
> [1] https://github.com/addthis/hydra/
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)