PMD 3.9 - Three times faster!

19 Dec 2006

PMD 3.9 is out (download/changelog)! This release should be a good one. Here's what I like about it most:

pmd-3.8/bin/ $ time ./pmd.sh /usr/local/java/src/java/ text basic
[... lots of output ...]
real    3m25.2s
pmd-3.9/bin/ $ time ./pmd.sh /usr/local/java/src/java/ text basic
[... lots of output ...]
real    1m0.350s  // <<<<<<<<<< WHOA

That's right, PMD 3.9 is more than three times faster than 3.8! This is due to optimization work done by Xavier Le Vourch. He added multithreading support, so if your machine has multiple CPUs (or is dual core) PMD will use as much horsepower as it can get. Xavier also added dynamic XPath rule optimization, so that if your XPath rule only checks, say, ASTLiteral nodes, PMD will use ASM to generate a visitor on the fly that only visits those nodes. And just for good measure he rewrote a couple of XPath rules in Java, too.

PMD 3.9 also comes with eight new rules, a better data flow analysis layer (no more lockups!) thanks to Sven Jacob, an experimental type resolution facility thanks to Allan Caplan, rule test reorganizations thanks to Wouter Zelle, and a slew of other bugfixes and enhancements. Enjoy!

For more information on PMD, check out the site or get the PMD book!