chefspec: Appears to be significantly slower with chef 13 than chef 12
I’m updating a number of our wrapper cookbooks and finding that the chefspec run is significantly slower with chef 13 than chef 12.
For example see https://travis-ci.org/ingenerator/chef-ingenerator-php/builds/262688704 - total job time of 9 minutes with chef 12, compared to 21 minutes with chef 13. Internally, rspec took 17 minutes 24 seconds on the chef 13 job, 8 minutes 11 seconds with chef 12.

I’m seeing the same discrepancy on all builds and on multiple cookbooks. The only difference between the two runs is the gemfile in use : one specifies chef 12 and the other specifies chef 13. Even the chef 12 build is about double what I was previously seeing with chefspec 5.4.0 and chef 12.
I have tried:
- verifying that I’m using
SoloRunnerrather thanServerRunner - making sure that vendors etc are in a chefignore file
- setting
config.server_runner_clear_cookbooks = false
Is this expected? Is there anything more I can do to reduce the runtime with Chef 13?
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 1
- Comments: 16 (10 by maintainers)
Commits related to this issue
- add vendor dir to chefignore see chefspec/chefspec#870 where vendoring gems into a cookbook results in a poor interaction with `:all_files` in the absence of a chefignore. Signed-off-by: Lamont Gran... — committed to chef-boneyard/chef-dk by lamont-granquist 6 years ago
- Add vendor directory to chefignore Fixes an issue caused by chefspec iterating over large directories and slowing tests down to a crawl. See: https://github.com/chefspec/chefspec/issues/870 [ID-123... — committed to intoximeters/chef-packer by TDembskiIntox 5 years ago
- Fix: resolving timeout issues on > chef13 via chefignore - https://github.com/chefspec/chefspec/issues/870 - https://github.com/berkshelf/berkshelf/issues/1492 - https://stackoverflow.com/a/44805964 ... — committed to artem-forks/chef-os-hardening by artem-sidorenko 5 years ago
- Fix: resolving timeout issues on > chef13 via chefignore - https://github.com/chefspec/chefspec/issues/870 - https://github.com/berkshelf/berkshelf/issues/1492 - https://stackoverflow.com/a/44805964 ... — committed to dev-sec/chef-ssh-hardening by artem-sidorenko 5 years ago
- Fix: resolving timeout issues on > chef13 via chefignore - https://github.com/chefspec/chefspec/issues/870 - https://github.com/berkshelf/berkshelf/issues/1492 - https://stackoverflow.com/a/44805964 ... — committed to artem-forks/chef-ssh-hardening by artem-sidorenko 5 years ago
- Fix: resolving timeout issues on > chef13 via chefignore - https://github.com/chefspec/chefspec/issues/870 - https://github.com/berkshelf/berkshelf/issues/1492 - https://stackoverflow.com/a/44805964 ... — committed to artem-forks/chef-ssh-hardening by artem-sidorenko 5 years ago
fixed via #903 as part of #905