As FindBugs is currently on the critical chain of our CI build, I did some profiling, which showed that a lot of time is spent in Subtypes2.traverseSupertypes, which is called for JSR305 analysis. This method implements a quite complex algorithm that visits every PATH in the supertype hierarchy. I could not see any reason in the JSR305 code why a simple depth first traversal of every supertype node shouldn't be sufficient. I implemented this as a patch, which gave me a speedup from 3:30 min to 3:00 min for the analysis of our codebase. You can pull my changes from https://code.google.com/r/tbaum-findbugs/
Some further notes:
And finally the formal pull request generated by TortoiseGit:
The following changes since commit 387670322ff17cbc3c38ac932032787905d2ff40:
Change jsr305/Analysis to more efficient traversal (2014-01-18 17:39:02 +0100)
are available in the git repository at:
https://code.google.com/r/tbaum-findbugs/ master
for you to fetch changes up to 387670322ff17cbc3c38ac932032787905d2ff40:
Change jsr305/Analysis to more efficient traversal (2014-01-18 17:39:02 +0100)
----------------------------------------------------------------
I've merged the code.
The FB test execution time with this patch decreased from 5:50 to 5:10 seconds on my workstation.
https://code.google.com/p/findbugs/source/detail?r=25e04a4256e6b47b28853df067f7fc695bf8dcdd
Thanks for the patch!
Regards,
Andrey