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 build by caching Selenium binary #238

Open
aik099 opened this issue Jun 19, 2016 · 4 comments
Open

Speed up build by caching Selenium binary #238

aik099 opened this issue Jun 19, 2016 · 4 comments

Comments

@aik099
Copy link
Member

aik099 commented Jun 19, 2016

Right now we download (via curl) fixed Selenium binary version. With Travis CI cache feature enabled we can download it to folder that will be cached and therefore avoid future downloads.

That should speed up the build.

@doriancmore
Copy link
Contributor

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:

https://docs.travis-ci.com/user/caching/#Things-not-to-cache

@aik099
Copy link
Member Author

aik099 commented Oct 25, 2016

Thanks, I know that. That's why I haven't proceeded with implementation, but still not sure if that JAR file is considered as large and how fast it's being downloaded from web compared to from cache.

@doriancmore
Copy link
Contributor

The download itself takes less than a second though.

https://travis-ci.org/minkphp/MinkSelenium2Driver/jobs/169868663#L215
4.38s including the 4s sleep for xvfb (which is overkill, but meaningless).

Caching vendor and installing with --prefer-dist should save ~14-17s. I'll submit PR to confirm.

@stof
Copy link
Member

stof commented Jan 3, 2017

Downloading from the google CDN should not be slower than downloading from the Travis cache IMO (which lives either in AWS S3 or in the Google infrastructure).

The 4s sleep should probably be removed. Starting xvfb is asynchronous but I'm quite sure we need it only when opening Firefox, i.e. when starting the first session. And we have other tasks running in between which should make it OK.

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

No branches or pull requests

3 participants