Created
June 4, 2016 16:48
-
-
Save oxyc/b215496bf5d72b8365710b0143152a96 to your computer and use it in GitHub Desktop.
a note on performance
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/docs/deployment/composer.md b/docs/deployment/composer.md | |
index d00a28b..10b60ea 100644 | |
--- a/docs/deployment/composer.md | |
+++ b/docs/deployment/composer.md | |
@@ -46,3 +46,34 @@ drupal_composer_dependencies: | |
drupal_core_path: "{{ drupal_composer_install_dir }}/web" | |
``` | |
+ | |
+## A note on build time performance | |
+ | |
+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`](http://fgrehm.viewdocs.io/vagrant-cachier/) plugin | |
+ | |
+If you manage multiple VM's own your computer, you can use the [`vagrant-cachier` plugin](http://fgrehm.viewdocs.io/vagrant-cachier/) to share Composer's package cache across all VM's. | |
+ | |
+1. Install the plugin on your host computer: `vagrant plugin install vagrant-cachier` | |
+2. Create a `Vagrantfile.local` next to your `config.yml` with the following: | |
+ | |
+```rb | |
+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](http://fgrehm.viewdocs.io/vagrant-cachier/usage/)._ | |
+ | |
+### Use [prestissimo](https://github.com/hirak/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](https://github.com/hirak/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: | |
+ | |
+```yaml | |
+composer_global_packages: | |
+ - { name: hirak/prestissimo, release: '^0.2' } | |
+``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment