nanoko-project/coffee-mill-maven-plugin — pull request #17 by nicolas-rempulski (2013-05-07 21:40:12+00:00)
Title: Multi-threaded coffee-script compilation

We hit a bottleneck in coffee-mil : coffee-script compilation with large amount of coffee -script source.

We write our Web App majoritly as coffee-script. Thus, a full web app can take up to 1 minute to compile.

This PR is a proposal for multi-threaded coffee-script compilation. This is not, in any way, a PR to be merged.

I see 2 points to by-pass this bottleneck :
* optimize Rhino CoffeeScript compilation
* Multi-thread CoffeeScript compilation

This PR is a proposal for the second point (multi-thread). It's just an example reducing my test sample (from 55 to 43 seconds compilation).

Linking this with a Rhino optimisation we could gain create productivity over CoffeeScript compilation. For now, I've no clue how to optimize Rhino.

To launch this sample :
mvn clean install -DthreadedCompile=true -DmaxThread=5

maxThread can be set to any values(default 4).

This PR is up to discussions.

PS : I can't share my test sample right now. Updating as soon as I have approval.

commit comment :
Add a new CoffeeScriptProcessor with multi-thread capability

Signed-off-by: nicolas-rempulski