Created attachment 29016 [details] patch Jasper works great multi-threaded. Using two threads per core substantially improves throughput on my test machine, reducing the time it takes to build from 9 minutes to 2 minutes. The attached patch adds a new -threadCount command-line argument to JspC, as well as a setThreadCount setter, suitable for use in an Ant task. It accepts a positive integer, or a core factor like "2.0C" which means two threads per core. 2.0C is the default. Note that on my machine it didn't help that much unless JspC was also configured to -compile the classes. I've attached a patch.
Created attachment 29017 [details] patch Bugzilla screwed up the mime type; trying again
I'd love to have this backported to Tomcat 7 as well. The patch should apply cleanly to the 7.0.x branch.
Sorry it took so long. Fixed in: - trunk for 9.0.11 onwards - 8.5.x for 8.5.33 onwards - 7.0.x for 7.0.91 onwards
I have found that if more than one thread is being used in 8.5.33 then the XML fragment that is created from an ant task can be corrupted. For example, there are multiple <servlet-class> elements for a <servlet> and they are empty. Sometimes there is a <servlet-class></servlet-name> element too.
See bug 62662
Thanks for adding that 62662 comment, Mark. My searching did not uncover it and it's nice to reference it here!