[Codenarc-developer] ThreadPool - Performance Changes
Brought to you by:
chrismair
From: Hamlet D. <ham...@ca...> - 2011-09-13 06:34:28
|
Hi Chris, I refactored AntSourceAnalyzer so that only one thread pool is created by it. Previously, a new threadpool was created for each FileSet. Now the same threadpool is reused throughout. Also, I rewrote the class in Java because it used a lot of unnecessary closures. The RunCodeNarcAgainstCodeNarc uses 2 FileSets. It went from ~48 seconds to ~39. This is good, but I don't know how much RunCodeNarcAgainstCodeNarc represents real usage. Hopefully quite well! Anyway, my next performance idea is to rewrite AbstractRule in Java. There are a lot of instances of this class in our system, and perhaps it will help. My performance metrics aren't giving me a lot of clues at this point. Too much time is still spent in Groovy method dispatch, but it's not clear what can be rewritten in Java to help, besides rewriting all of the rule classes. Thanks, -- Hamlet D'Arcy ham...@ca... |