node.js - Parallel javascript minification under require.js, using node? -


i'm using node.js minify javascript files packaged under require.js dependency scheme, r.js doing minification. (see: http://requirejs.org/docs/optimization.html)

it seems minification policy ripe parallelization. is, each javascript independently minified, , node should fork'able within bash-shell context.

has tried this? right now, according "time", have wait around 4m 43s current minification process complete.

some of questions answer are: can several instances of node launched in parallel? r.js maintain state rendered corrupt if several minifications proceeding in parallel?

thanks in advance. also, if no 1 has built parallel harness node / r.js, let me know , might able scratch if there demand.

i decided execute several background r.js jobs in parallel (using background process "&", along "wait"). result: r.js erring message:

error: nope     @ check (/path/to/bin/r.js:2744:23) 

the parallel uglification 1m faster, result useless result of above errors. evidently, there issue running parallel node.js / r.js processes in parallel.

i reverting sequential r.js job model, producing working results. if fixes parallel issue, please ping me.

regarding parallel jobs, aside approach adopted here, there more general tool @ gnu.org: gnu parallel, @ http://www.gnu.org/software/parallel/


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -