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

Run npm install/build tasks in parallel #2381

Merged
merged 6 commits into from
Jun 5, 2017
Merged

Run npm install/build tasks in parallel #2381

merged 6 commits into from
Jun 5, 2017

Conversation

paulirish
Copy link
Member

This makes install-all and build-all about 2-3x faster

On travis this takes:

  • install-all from 28s to 12s.
  • build-all from 38s to 27s.

@wardpeet
Copy link
Collaborator

you probably have to change the package.json to first install the concurrently package and than move forward.

I also noticed that concurrently has some old npm packages. I'll create a PR to update their chalk dependency.

package.json Outdated
@@ -11,12 +11,12 @@
"node": ">=6"
},
"scripts": {
"install-all": "yarn && yarn install-launcher && yarn install-cli && yarn install-extension && yarn install-viewer",
"install-all": "yarn && concurrently --kill-others-on-fail \"yarn install-launcher\" \"yarn install-cli\" \"yarn install-extension\" \"yarn install-viewer\"",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this may or may not work on linux, apparently

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can test real quick on linux

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to clarify, it's the --kill-others-on-fail that may not work on linux

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at worst it'll just continue to run them all, even if one failed

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works on linux! (ubuntu)
image

Copy link
Member

@brendankenny brendankenny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm good if Travis is 👍

@brendankenny
Copy link
Member

appveyor seems unhappy but not sure why

@paulirish
Copy link
Member Author

Using this module now: https://github.com/madarche/npm-run-posix-or-windows/blob/master/bin/cli.js

and basically letting windows get the slow path since it can't be trusted with being fancy.

@paulirish paulirish merged commit 387731a into master Jun 5, 2017
@paulirish paulirish deleted the paralelltasks branch June 5, 2017 18:24
@paulirish
Copy link
Member Author

Looking at travis builds from today:

  • install-all from 32s to 9.7s. (3.3x faster)
  • build-all from 101s to 33s. (3.0x faster)

🚀

@paulirish paulirish mentioned this pull request Jun 6, 2017
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants