Opting for composer based installs will most likely increase your VM's time to provision considerably. There are a couple of ways you can improve this.
Install vagrant-cachier
plugin
If you manage multiple VM's on your computer, you can use the vagrant-cachier
plugin to share Composer's package cache across all of them.
- Install the plugin on your host computer:
vagrant plugin install vagrant-cachier
- Create a
Vagrantfile.local
next to yourconfig.yml
with the following:
config.cache.auto_detect = false
config.cache.enable :generic, { :cache_dir => "/home/vagrant/.composer/cache" }
Note: Out of the box sharing the Composer cache is not supported as the plugin requires PHP to be installed before the provision takes place. This is why the generic cache bucket is used instead.
You can also use this plugin to share other package manager caches. For more information read the documentation.
Use prestissimo for installing composer packages in parallel
The main performance decrease with using Composer over Drush makefiles will be the time it takes to download package repositories. Prestissimo will not improve this but it can still increase performance by installing packages in parallel.
Add the following to your config.yml
to use Prestissimo whenever composer installs packages:
composer_global_packages:
- { name: hirak/prestissimo, release: '^0.2' }
Just realized scope was a required setting. Didn't catch that when glancing the docs...