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

Cache electron-prebuilt binaries for faster travis builds #685

Merged
merged 2 commits into from Dec 14, 2016

Conversation

imlucas
Copy link
Contributor

@imlucas imlucas commented Dec 14, 2016

Speedup comes from not having to download the prebuilt electron binaries during npm install every time a build runs so we can run the tests.

Note: mongodb-js/runner caches the server artifacts it downloads to node_modules/ so they’re already cached.

@pzrq
Copy link
Contributor

pzrq commented Dec 14, 2016

Looks like overall this delivers a measurable speedup relative to our current master.

Compare the original build for this PR:

 Elapsed time 7 min 42 sec
 Total time 12 min 46 sec

With a noop build on top of the PR branch:

 Elapsed time 8 min 37 sec
 Total time 13 min 13 sec

The updated branch builds for this PR, 1 and 2:

 Elapsed time 8 min 48 sec
 Total time 11 min 56 sec
 Elapsed time 8 min 13 sec
 Total time 11 min 5 sec

With for reference some recent master builds:

 Elapsed time 10 min 19 sec
 Total time 16 min 40 sec

https://travis-ci.com/10gen/compass/builds/36615386

 Elapsed time 10 min 47 sec
 Total time 17 min 59 sec

https://travis-ci.com/10gen/compass/builds/36593054

# Before electron-build updates
 Elapsed time 7 min 9 sec
 Total time 11 min 32 sec

https://travis-ci.com/10gen/compass/builds/36537371

For info, I think the speedup comes from not repeating the build step, not the download:
https://docs.travis-ci.com/user/caching/#Things-not-to-cache

Large files that are quick to install but slow to download do not benefit from caching, as they take as long to download from the cache as from the original source:

  • ...
  • Compiled binaries

I'm not sure how the cache gets invalidated but the Travis page indicates how to do so if (speculating) older builds are not automatically cleaned out automatically by hadron-build for whatever reason, something that would also apply to the cached node_modules.

So overall LGTM 👍

@pzrq pzrq merged commit 9b7db9f into master Dec 14, 2016
@pzrq pzrq deleted the travis-cache-electron-binaries branch December 14, 2016 02:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants