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

Speed up the build #344

Merged
merged 11 commits into from
Feb 25, 2018
Merged

Speed up the build #344

merged 11 commits into from
Feb 25, 2018

Conversation

searls
Copy link
Member

@searls searls commented Feb 25, 2018

Try to make npm run test:ci faster by sprinkling in some parallel tasks, particularly (a) the styling + the tests and (b) each of the example projects. All results local.

master:

real	1m21.797s
user	1m18.127s
sys	0m15.781s

with npm-run-all's run-p:

real	0m53.442s
user	1m42.984s
sys	0m18.903s

@searls
Copy link
Member Author

searls commented Feb 25, 2018

The differences on travis were pretty dramatic despite small sample size.

Master:
screen shot 2018-02-25 at 16 32 57

This branch
screen shot 2018-02-25 at 16 32 32

Master is an outlier, but this patch would probably reduce variability by running things parallel rather than serially

@searls searls changed the title Parallelize the build Speed up the build Feb 25, 2018
@searls
Copy link
Member Author

searls commented Feb 25, 2018

Okay, and I figured out why standard had been taking 30s. Turns out its deglob dependency redundantly ends up traversing ignored directories unless they're explicitly ignored like "examples/**", which cut our lint time from 30s to 1s.

The time for npm run test:ci is now down to:

real	0m35.419s
user	1m12.684s
sys	0m11.266s

@searls
Copy link
Member Author

searls commented Feb 25, 2018

Each travis build was also a good bit faster:
screen shot 2018-02-25 at 17 11 02

Error: Cannot find module 'caniuse-lite/dist/unpacker/agents' (While processing preset: "/home/travis/build/testdouble/testdouble.js/examples/babel/node_modules/babel-preset-env/lib/index.js")
the short timeout might be breaking on a single-threaded CI
@searls
Copy link
Member Author

searls commented Feb 25, 2018

Going to merge now. Cache slowed build down but we should watch it over 2 or 3 builds on master to see if that was a one time cost

@searls searls merged commit ee2af79 into master Feb 25, 2018
@searls searls deleted the go-fast branch February 25, 2018 23:52
@searls
Copy link
Member Author

searls commented Feb 26, 2018

To close the loop, after warming the cache on master travis is indeed faster with the various node_modules directories cached
screen shot 2018-02-25 at 19 48 25

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.

None yet

1 participant