MinkSelenium2Driver icon indicating copy to clipboard operation
MinkSelenium2Driver copied to clipboard

Speed up build by caching Selenium binary

Open aik099 opened this issue 9 years ago • 4 comments

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.

aik099 avatar Jun 19 '16 08:06 aik099

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

adorin avatar Oct 25 '16 15:10 adorin

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.

aik099 avatar Oct 25 '16 16:10 aik099

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.

adorin avatar Oct 26 '16 06:10 adorin

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.

stof avatar Jan 03 '17 14:01 stof