I have written some PMD custom XPath rules for XML files and some of verified files are large ( 18MB size / 400,000 lines). With PMD 4.2.6 I had no performance issue validating those files but after upgrading to 5.4.1 my memory consumption has increased and also it became almost 7 times slower to verify large XML file. I found a work around to make it as fast as 4.2.6 by removing line breaks from my XML file. But the drawback is PMD doesn’t report the correct line/column numbers.
I was able to track the performance degradation in the following class:
It seems this class has been introduced in recent versions of PMD.
Log in to post a comment.