Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is there a way to invoke in parallel mode to use multiple cpu cores for faster builds? #72

Closed
tjwebb opened this issue Dec 6, 2014 · 11 comments

Comments

@tjwebb
Copy link

tjwebb commented Dec 6, 2014

I'm wondering if this is possible with gulp-uglify. Or maybe just uglify in general

@ilanbiala
Copy link

Not unless you do cluster.fork() I think, but I may be wrong.

@terinjokes
Copy link
Owner

@tjwebb this is potentially doable (and it is, in fact, what my other gulp compiler plugin does…), but I'm going to look at doing it after I've spent time in UglifyJS core resolving the sourcemaps issues.

Sorry that it's not a priority until then.

@terinjokes
Copy link
Owner

For many reasons, including those listed #79 (comment), I won't be implementing parallel processing at this time.

@wjordan
Copy link

wjordan commented Feb 2, 2015

It is definitely possible to run uglifyjs in parallel mode to use multiple cpu cores for faster builds by using child_process.fork. This has already been implemented in webdeps/mnfy, which depends on thenables/slave to simplify the inter-process communication. I've put together a working prototype uglifyjs gulp plugin using this approach. I can work this implementation into a PR for gulp-uglify if there is interest.

@digitalmaster
Copy link

@wjordan omg yes!! #bump

@kevincolten
Copy link

@wjordan +1

@Leikam
Copy link

Leikam commented Aug 14, 2015

@wjordan +1, wanted.

@JustFly1984
Copy link

+1, definitely wanted!

@ericsvendsen
Copy link

@wjordan +1

1 similar comment
@scythargon
Copy link

@wjordan +1

@terinjokes
Copy link
Owner

This is outside the scope of gulp-uglify for the reasons listed in the linked commented above.

This is outside the scope of Gulp for the following reasons: gulpjs/gulp#317 (comment).

Edit: See my explanation of how this can be solved, and my encouragement to experiment: #79 (comment).

Repository owner locked and limited conversation to collaborators Oct 29, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants