Parallel javascript minification under require.js, using node?

I'm using node.js to minify javascript files packaged under a require.js dependency scheme, with r.js actually doing the minification. (See: http://requirejs.org/docs/optimization.html)

It seems like this minification policy is ripe for parallelization. That is, each javascript is independently minified, and node itself should be fork'able within a bash-shell context.

Has anyone tried this? Right now, according to "time", I have to wait around 4m 43s for the current minification process to complete.

Some of the questions I would like to answer are: can several instances of node be launched in parallel? Does r.js maintain any state that would be rendered corrupt if several minifications are proceeding in parallel?

Thanks in advance. Also, if no one has built a parallel harness for node / r.js, then let me know and I might be able to scratch up something if there is a demand.

I decided to execute several background r.js jobs in parallel (using the background process "&", along with "wait"). Result: r.js is erring with this message:

Error: nope
    at check (/path/to/bin/r.js:2744:23)

The parallel uglification was about 1m faster, but the result was useless as a result of the above errors. Evidently, there is an issue running parallel node.js / r.js processes in parallel.

I am reverting to the sequential r.js job model, as that is producing working results. If anyone fixes the parallel issue, please ping me.

Regarding parallel jobs, aside from the approach I adopted here, there also is a more general tool at gnu.org: GNU parallel, at http://www.gnu.org/software/parallel/