Bug 53492 - Make JspC shell multithreaded
Make JspC shell multithreaded
Status: NEW
Product: Tomcat 7
Classification: Unclassified
Component: Jasper
PC Mac OS X 10.4
: P2 enhancement with 5 votes (vote)
: ---
Assigned To: Tomcat Developers Mailing List
Depends on:
  Show dependency tree
Reported: 2012-07-01 07:20 UTC by Dan Fabulich
Modified: 2014-04-23 21:38 UTC (History)
1 user (show)

patch (7.09 KB, application/octet-stream)
2012-07-01 07:20 UTC, Dan Fabulich
patch (7.09 KB, patch)
2012-07-01 07:21 UTC, Dan Fabulich
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Fabulich 2012-07-01 07:20:32 UTC
Created attachment 29016 [details]

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.
Comment 1 Dan Fabulich 2012-07-01 07:21:16 UTC
Created attachment 29017 [details]

Bugzilla screwed up the mime type; trying again
Comment 2 Dan Fabulich 2012-07-01 07:22:55 UTC
I'd love to have this backported to Tomcat 7 as well. The patch should apply cleanly to the 7.0.x branch.