Caveat: I tried for a minimal reproducible error case that exercised the rails env. A more complex use case is at the bottom and affects
- run: bin/rails r "puts 'foo'" takes a highly variable amount of time on CircleCI 2.0.
Local laptop result: 16s-21s consistently, including cold cache.
15 container results (3 builds @ 5 containers each):
No ruby/rails commands had been run in the container prior to this point. Gems were restored from cache and DB was restored from cache and loaded with pg_restore.
Note that I consider the 22s containers to be perfectly expected. The 50s+ containers are my worry (3xlocal!). We run a variety of builds across multiple containers and that potential 30 seconds added on to each rails related command we run gets onerous when it’s a per container cost.
Related (probably) issue is that
rspec taking a very long time for loading files:
From Circle logs:
Finished in 1 minute 31.1 seconds (files took **1 minute 47.31** seconds to load)
From local with same build command/set of files (spring disabled - no preloaders involved):
Finished in 1 minute 48.98 seconds (files took **16.06** seconds to load)
Note to Circle employees - happy to provide a link to private builds if it’d help.