Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating a new project is too slow #162

Closed
sebas5384 opened this issue Jun 14, 2016 · 10 comments
Closed

Creating a new project is too slow #162

sebas5384 opened this issue Jun 14, 2016 · 10 comments

Comments

@sebas5384
Copy link

drupal@e2b2898b6fdc:~/app$ time composer create-project drupal-composer/drupal-project:8.x-dev src --prefer-dist --stability dev --no-interaction
Installing drupal-composer/drupal-project (8.x-dev 544ba79cd95cb4fca599cba586498aaf0faf2885)
  - Installing drupal-composer/drupal-project (8.x-dev 544ba79)
    Downloading: 100%

Created project in src
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Installing drupal-composer/drupal-scaffold (2.0.1)
    Downloading: 100%

  - Installing cweagans/composer-patches (1.5.0)
    Downloading: 100%

  - Installing composer/installers (v1.0.25)
    Downloading: 100%

  - Installing psr/http-message (1.0)
    Downloading: 100%

  - Installing guzzlehttp/psr7 (1.3.0)
    Downloading: 100%

  - Installing guzzlehttp/promises (1.2.0)
    Downloading: 100%

  - Installing guzzlehttp/guzzle (6.2.0)
    Downloading: 100%

  - Installing jcalderonzumba/gastonjs (v1.0.3)
    Downloading: 100%

  - Installing twig/twig (v1.24.1)
    Downloading: 100%

  - Installing symfony/polyfill-mbstring (v1.2.0)
    Downloading: 100%

  - Installing symfony/css-selector (v2.8.7)
    Downloading: 100%

  - Installing behat/mink (v1.7.1)
    Downloading: 100%

  - Installing jcalderonzumba/mink-phantomjs-driver (v0.3.1)
    Downloading: 100%

  - Installing paragonie/random_compat (v1.4.1)
    Downloading: 100%

  - Installing composer/semver (1.4.1)
    Downloading: 100%

  - Installing zendframework/zend-diactoros (1.3.5)
    Downloading: 100%

  - Installing ircmaxell/password-compat (v1.0.4)
    Downloading: 100%

  - Installing symfony/polyfill-php55 (v1.2.0)
    Downloading: 100%

  - Installing symfony/polyfill-php54 (v1.2.0)
    Downloading: 100%

  - Installing symfony/http-foundation (v2.8.7)
    Downloading: 100%

  - Installing symfony/psr-http-message-bridge (v0.2)
    Downloading: 100%

  - Installing masterminds/html5 (2.2.1)
    Downloading: 100%

  - Installing doctrine/lexer (v1.0.1)
    Downloading: 100%

  - Installing egulias/email-validator (1.2.12)
    Downloading: 100%

  - Installing psr/log (1.0.0)
    Downloading: 100%

  - Installing symfony/debug (v2.8.7)
    Downloading: 100%

  - Installing symfony/event-dispatcher (v2.8.7)
    Downloading: 100%

  - Installing symfony/http-kernel (v2.8.7)
    Downloading: 100%

  - Installing stack/builder (v1.0.4)
    Downloading: 100%

  - Installing zendframework/zend-stdlib (3.0.1)
    Downloading: 100%

  - Installing zendframework/zend-escaper (2.5.1)
    Downloading: 100%

  - Installing zendframework/zend-feed (2.7.0)
    Downloading: 100%

  - Installing easyrdf/easyrdf (0.9.1)
    Downloading: 100%

  - Installing symfony/routing (v2.8.7)
    Downloading: 100%

  - Installing symfony-cmf/routing (1.3.0)
    Downloading: 100%

  - Installing doctrine/annotations (v1.2.7)
    Downloading: 100%

  - Installing doctrine/inflector (v1.1.0)
    Downloading: 100%

  - Installing doctrine/collections (v1.3.0)
    Downloading: 100%

  - Installing doctrine/cache (v1.6.0)
    Downloading: 100%

  - Installing doctrine/common (v2.5.3)
    Downloading: 100%

  - Installing symfony/yaml (v2.8.7)
    Downloading: 100%

  - Installing symfony/polyfill-iconv (v1.2.0)
    Downloading: 100%

  - Installing symfony/process (v2.8.7)
    Downloading: 100%

  - Installing symfony/translation (v2.8.7)
    Downloading: 100%

  - Installing symfony/validator (v2.8.7)
    Downloading: 100%

  - Installing symfony/serializer (v2.8.7)
    Downloading: 100%

  - Installing symfony/dependency-injection (v2.8.7)
    Downloading: 100%

  - Installing symfony/console (v2.8.7)
    Downloading: 100%

  - Installing symfony/polyfill-apcu (v1.2.0)
    Downloading: 100%

  - Installing symfony/class-loader (v2.8.7)
    Downloading: 100%

  - Installing drupal/core (8.1.2)
    Downloading: 100%

  - Installing pear/console_table (v1.3.0)
    Downloading: 100%

  - Installing symfony/var-dumper (v2.8.7)
    Downloading: 100%

  - Installing jakub-onderka/php-console-color (0.1)
    Downloading: 100%

  - Installing jakub-onderka/php-console-highlighter (v0.3.2)
    Downloading: 100%

  - Installing dnoegel/php-xdg-base-dir (0.1)
    Downloading: 100%

  - Installing nikic/php-parser (v2.1.0)
    Downloading: 100%

  - Installing psy/psysh (v0.7.2)
    Downloading: 100%

  - Installing drush/drush (8.1.2)
    Downloading: 100%

  - Installing gabordemooij/redbean (v4.3.2)
    Downloading: 100%

  - Installing padraic/humbug_get_contents (1.0.4)
    Downloading: 100%

  - Installing padraic/phar-updater (1.0.3)
    Downloading: 100%

  - Installing symfony/finder (v2.8.7)
    Downloading: 100%

  - Installing stecman/symfony-console-completion (0.5.1)
    Downloading: 100%

  - Installing phpseclib/phpseclib (2.0.2)
    Downloading: 100%

  - Installing symfony/filesystem (v2.8.7)
    Downloading: 100%

  - Installing symfony/dom-crawler (v2.8.7)
    Downloading: 100%

  - Installing symfony/config (v2.8.7)
    Downloading: 100%

  - Installing alchemy/zippy (0.3.5)
    Downloading: 100%

  - Installing drupal/console (0.11.3)
    Downloading: 100%

  - Installing symfony/browser-kit (v3.1.0)
    Downloading: 100%

  - Installing fabpot/goutte (v3.1.2)
    Downloading: 100%

  - Installing behat/mink-browserkit-driver (v1.3.2)
    Downloading: 100%

  - Installing behat/mink-goutte-driver (v1.2.1)
    Downloading: 100%

  - Installing mikey179/vfsstream (v1.6.3)
    Downloading: 100%

  - Installing sebastian/version (1.0.6)
    Downloading: 100%

  - Installing sebastian/global-state (1.1.1)
    Downloading: 100%

  - Installing sebastian/recursion-context (1.0.2)
    Downloading: 100%

  - Installing sebastian/exporter (1.2.1)
    Downloading: 100%

  - Installing sebastian/environment (1.3.7)
    Downloading: 100%

  - Installing sebastian/diff (1.4.1)
    Downloading: 100%

  - Installing sebastian/comparator (1.2.0)
    Downloading: 100%

  - Installing doctrine/instantiator (1.0.5)
    Downloading: 100%

  - Installing webmozart/assert (1.0.2)
    Downloading: 100%

  - Installing phpdocumentor/reflection-common (1.0)
    Downloading: 100%

  - Installing phpdocumentor/type-resolver (0.2)
    Downloading: 100%

  - Installing phpdocumentor/reflection-docblock (3.1.0)
    Downloading: 100%

  - Installing phpspec/prophecy (v1.6.1)
    Downloading: 100%

  - Installing phpunit/php-text-template (1.2.1)
    Downloading: 100%

  - Installing phpunit/phpunit-mock-objects (2.3.8)
    Downloading: 100%

  - Installing phpunit/php-timer (1.0.8)
    Downloading: 100%

  - Installing phpunit/php-token-stream (1.4.8)
    Downloading: 100%

  - Installing phpunit/php-file-iterator (1.4.1)
    Downloading: 100%

  - Installing phpunit/php-code-coverage (2.2.4)
    Downloading: 100%

  - Installing phpunit/phpunit (4.8.26)
    Downloading: 100%

behat/mink suggests installing behat/mink-selenium2-driver (slow, but JS-enabled driver for any app (requires Selenium2))
behat/mink suggests installing behat/mink-zombie-driver (fast and JS-enabled headless driver for any app (requires node.js))
paragonie/random_compat suggests installing ext-libsodium (Provides a modern crypto API that can be used to generate random bytes.)
zendframework/zend-feed suggests installing zendframework/zend-cache (Zend\Cache component, for optionally caching feeds between requests)
zendframework/zend-feed suggests installing zendframework/zend-db (Zend\Db component, for use with PubSubHubbub)
zendframework/zend-feed suggests installing zendframework/zend-http (Zend\Http for PubSubHubbub, and optionally for use with Zend\Feed\Reader)
zendframework/zend-feed suggests installing zendframework/zend-servicemanager (Zend\ServiceManager component, for easily extending ExtensionManager implementations)
zendframework/zend-feed suggests installing zendframework/zend-validator (Zend\Validator component, for validating email addresses used in Atom feeds and entries ehen using the Writer subcomponent)
easyrdf/easyrdf suggests installing ml/json-ld (~1.0)
symfony/routing suggests installing symfony/expression-language (For using expression matching)
symfony/validator suggests installing symfony/intl ()
symfony/validator suggests installing symfony/property-access (For using the 2.4 Validator API)
symfony/validator suggests installing symfony/expression-language (For using the 2.4 Expression validator)
symfony/serializer suggests installing symfony/property-access (For using the ObjectNormalizer.)
symfony/dependency-injection suggests installing symfony/expression-language (For using expressions in service container configuration)
symfony/dependency-injection suggests installing symfony/proxy-manager-bridge (Generate service proxies to lazy load them)
pear/console_table suggests installing pear/Console_Color2 (>=0.1.2)
symfony/var-dumper suggests installing ext-symfony_debug ()
psy/psysh suggests installing ext-pdo-sqlite (The doc command requires SQLite to work.)
drush/drush suggests installing drush/config-extra (Provides configuration workflow commands, such as config-merge.)
phpseclib/phpseclib suggests installing ext-libsodium (SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.)
phpseclib/phpseclib suggests installing ext-gmp (Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.)
alchemy/zippy suggests installing guzzle/guzzle (To use the GuzzleTeleporter)
sebastian/global-state suggests installing ext-uopz (*)
phpunit/phpunit suggests installing phpunit/php-invoker (~1.1)
Writing lock file
Generating autoload files
    Downloading: 100%
    Downloading: 100%
    Downloading: 100%
    Downloading: 100%
    Downloading: 100%
    Downloading: 100%
    Downloading: 100%
    Downloading: 100%
    Downloading: 100%
    Downloading: 100%
    Downloading: 100%
    Downloading: 100%
    Downloading: 100%
    Downloading: 100%
    Downloading: 100%
> DrupalProject\composer\ScriptHandler::createRequiredFiles
Create a sites/default/settings.php file with chmod 0666
Create a sites/default/services.yml file with chmod 0666
Create a sites/default/files directory with chmod 0777

Here's the time this is taking:

real    36m51.358s
user    1m36.250s
sys 0m26.710s

Is this normal? I'm doing something wrong?

thanks!

@weitzman
Copy link
Contributor

weitzman commented Jun 14, 2016 via email

@jameswilson
Copy link

jameswilson commented Jun 14, 2016

I've also seen times go down drastically by using https://github.com/hirak/prestissimo

$ composer global require "hirak/prestissimo:^0.3"

Which parallelizes package downloads for composer install command, not sure if it works with create-project command. Please report back if it helps!

@oxyc
Copy link

oxyc commented Jun 14, 2016

Which parallelizes package downloads for composer install command, not sure if it works with create-project command. Please report back if it helps!

As of 0.3.1 it does! https://github.com/hirak/prestissimo/releases/tag/0.3.1

Sidenote: @jameswilson you're based in Cuenca?! At the moment I'm in the US for a few months, but it would be awesome to meet up with some Drupal developers when I get back. Any meetups in the area maybe? :)

@jameswilson
Copy link

@oxyc I'll be in Cuenca 'till mid July. There are no other "local" Drupal developers in Cuenca to my knowledge. If you know some, let me know.

@sebas5384
Copy link
Author

sebas5384 commented Jun 15, 2016

thanks for the help guys!

@weitzman I'll disable xdebug because I think is enabled. I'm using nfs because of docker-machine on MacOSX, maybe thats why, but we test it on linux and it took around 25 minutos.

I tried prestissimo before and didn't parallelize, so maybe the new version 0.3.1 works now :)

Could you guys show some profiling from your side? to compare our results?

@oxyc
Copy link

oxyc commented Jun 15, 2016

@sebas5384 over at Drupal VM where we provision an entire dev environment (php, mysql, apache etc etc) I did some benchmarking of how switching to drupal-project effected the total build time compared to the previously used drush make build. geerlingguy/drupal-vm#699 (comment). Edit: I now realize this ran without composer create-project, but switching over to create-project couldn't have added more than 10-30sec on travis (looking at the recent logs).

Later on I also ran some tests locally and it ended up taking ~300 sec to build drupal-project from an empty cache with prestissimo on my 1.1ghz dual core machine with PHP 5.6. Since then Prestissimo 0.3.1 came out so now it's slightly faster as well. geerlingguy/drupal-vm#699 (comment)

@weitzman
Copy link
Contributor

weitzman commented Jul 8, 2016

Just took me about 8 minutes. FYI, I just did this with no xdebug, no NFS, PHP7, no virtualization, and an SSD. Note that a bunch of projects downloaded from cache so perhaps not a good comparison

~/reps/multiplesite $ time com create-project drupal-composer/drupal-project:8.x-dev src --prefer-dist --stability dev --no-interaction
Installing drupal-composer/drupal-project (8.x-dev 2f7941b8f85b064012d7e41e3e8f284d373c8ca0)
  - Installing drupal-composer/drupal-project (8.x-dev 2f7941b)
    Downloading: 100%         

Created project in src
> DrupalProject\composer\ScriptHandler::checkComposerVersion
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Installing drupal-composer/drupal-scaffold (2.0.1)
    Loading from cache

  - Installing cweagans/composer-patches (1.5.0)
    Loading from cache

  - Installing composer/installers (v1.1.0)
    Downloading: 100%         

  - Installing guzzlehttp/promises (1.2.0)
    Loading from cache

  - Installing psr/http-message (1.0)
    Loading from cache

  - Installing guzzlehttp/psr7 (1.3.1)
    Loading from cache

  - Installing guzzlehttp/guzzle (6.2.0)
    Loading from cache

  - Installing jcalderonzumba/gastonjs (v1.0.3)
    Loading from cache

  - Installing twig/twig (v1.24.1)
    Loading from cache

  - Installing symfony/polyfill-mbstring (v1.2.0)
    Loading from cache

  - Installing symfony/css-selector (v2.8.8)
    Downloading: 100%         

  - Installing behat/mink (v1.7.1)
    Loading from cache

  - Installing jcalderonzumba/mink-phantomjs-driver (v0.3.1)
    Loading from cache

  - Installing zendframework/zend-stdlib (3.0.1)
    Loading from cache

  - Installing zendframework/zend-escaper (2.5.2)
    Downloading: 100%         

  - Installing zendframework/zend-feed (2.7.0)
    Loading from cache

  - Installing zendframework/zend-diactoros (1.3.5)
    Loading from cache

  - Installing symfony/yaml (v2.8.8)
    Downloading: 100%         

  - Installing symfony/translation (v2.8.8)
    Downloading: 100%         

  - Installing symfony/validator (v2.8.8)
    Downloading: 100%         

  - Installing ircmaxell/password-compat (v1.0.4)
    Loading from cache

  - Installing symfony/polyfill-php55 (v1.2.0)
    Loading from cache

  - Installing symfony/serializer (v2.8.8)
    Downloading: 100%         

  - Installing symfony/routing (v2.8.8)
    Downloading: 100%         

  - Installing symfony/polyfill-php54 (v1.2.0)
    Loading from cache

  - Installing symfony/http-foundation (v2.8.8)
    Downloading: 100%         

  - Installing symfony/psr-http-message-bridge (v0.2)
    Loading from cache

  - Installing symfony/process (v2.8.8)
    Downloading: 100%         

  - Installing symfony/polyfill-iconv (v1.2.0)
    Loading from cache

  - Installing symfony/event-dispatcher (v2.8.8)
    Downloading: 100%         

  - Installing psr/log (1.0.0)
    Loading from cache

  - Installing symfony/debug (v2.8.8)
    Downloading: 100%         

  - Installing symfony/http-kernel (v2.8.8)
    Downloading: 100%         

  - Installing symfony/dependency-injection (v2.8.8)
    Downloading: 100%         

  - Installing symfony/console (v2.8.8)
    Downloading: 100%         

  - Installing symfony/polyfill-apcu (v1.2.0)
    Loading from cache

  - Installing symfony/class-loader (v2.8.8)
    Downloading: 100%         

  - Installing symfony-cmf/routing (1.3.0)
    Loading from cache

  - Installing stack/builder (v1.0.4)
    Loading from cache

  - Installing paragonie/random_compat (v1.4.1)
    Loading from cache

  - Installing masterminds/html5 (2.2.1)
    Loading from cache

  - Installing doctrine/lexer (v1.0.1)
    Loading from cache

  - Installing egulias/email-validator (1.2.13)
    Downloading: 100%         

  - Installing easyrdf/easyrdf (0.9.1)
    Loading from cache

  - Installing doctrine/inflector (v1.1.0)
    Loading from cache

  - Installing doctrine/collections (v1.3.0)
    Loading from cache

  - Installing doctrine/cache (v1.6.0)
    Loading from cache

  - Installing doctrine/annotations (v1.2.7)
    Loading from cache

  - Installing doctrine/common (v2.5.3)
    Loading from cache

  - Installing composer/semver (1.4.1)
    Loading from cache

  - Installing drupal/core (8.1.5)
    Downloading: 100%         

  - Installing pear/console_table (v1.3.0)
    Loading from cache

  - Installing symfony/var-dumper (v2.8.8)
    Downloading: 100%         

  - Installing jakub-onderka/php-console-color (0.1)
    Loading from cache

  - Installing jakub-onderka/php-console-highlighter (v0.3.2)
    Loading from cache

  - Installing dnoegel/php-xdg-base-dir (0.1)
    Loading from cache

  - Installing nikic/php-parser (v2.1.0)
    Loading from cache

  - Installing psy/psysh (v0.7.2)
    Loading from cache

  - Installing drush/drush (8.1.2)
    Loading from cache

  - Installing symfony/finder (v2.8.8)
    Downloading: 100%         

  - Installing symfony/filesystem (v2.8.8)
    Downloading: 100%         

  - Installing symfony/dom-crawler (v2.8.8)
    Downloading: 100%         

  - Installing symfony/config (v2.8.8)
    Downloading: 100%         

  - Installing stecman/symfony-console-completion (0.5.1)
    Loading from cache

  - Installing phpseclib/phpseclib (2.0.2)
    Loading from cache

  - Installing padraic/humbug_get_contents (1.0.4)
    Loading from cache

  - Installing padraic/phar-updater (1.0.3)
    Loading from cache

  - Installing gabordemooij/redbean (v4.3.2)
    Loading from cache

  - Installing dflydev/placeholder-resolver (v1.0.2)
    Loading from cache

  - Installing alchemy/zippy (0.3.5)
    Loading from cache

  - Installing drupal/console (1.0.0-beta3)
    Loading from cache

  - Installing symfony/browser-kit (v3.1.2)
    Downloading: 100%         

  - Installing fabpot/goutte (v3.1.2)
    Loading from cache

  - Installing behat/mink-browserkit-driver (v1.3.2)
    Loading from cache

  - Installing behat/mink-goutte-driver (v1.2.1)
    Loading from cache

  - Installing mikey179/vfsstream (v1.6.3)
    Loading from cache

  - Installing sebastian/version (1.0.6)
    Loading from cache

  - Installing sebastian/global-state (1.1.1)
    Loading from cache

  - Installing sebastian/recursion-context (1.0.2)
    Loading from cache

  - Installing sebastian/exporter (1.2.2)
    Loading from cache

  - Installing sebastian/environment (1.3.7)
    Loading from cache

  - Installing sebastian/diff (1.4.1)
    Loading from cache

  - Installing sebastian/comparator (1.2.0)
    Loading from cache

  - Installing doctrine/instantiator (1.0.5)
    Loading from cache

  - Installing phpunit/php-text-template (1.2.1)
    Loading from cache

  - Installing phpunit/phpunit-mock-objects (2.3.8)
    Loading from cache

  - Installing phpunit/php-timer (1.0.8)
    Loading from cache

  - Installing phpunit/php-file-iterator (1.4.1)
    Loading from cache

  - Installing phpunit/php-token-stream (1.4.8)
    Loading from cache

  - Installing phpunit/php-code-coverage (2.2.4)
    Loading from cache

  - Installing webmozart/assert (1.0.2)
    Loading from cache

  - Installing phpdocumentor/reflection-common (1.0)
    Loading from cache

  - Installing phpdocumentor/type-resolver (0.2)
    Loading from cache

  - Installing phpdocumentor/reflection-docblock (3.1.0)
    Loading from cache

  - Installing phpspec/prophecy (v1.6.1)
    Loading from cache

  - Installing phpunit/phpunit (4.8.26)
    Loading from cache

behat/mink suggests installing behat/mink-selenium2-driver (slow, but JS-enabled driver for any app (requires Selenium2))
behat/mink suggests installing behat/mink-zombie-driver (fast and JS-enabled headless driver for any app (requires node.js))
zendframework/zend-feed suggests installing zendframework/zend-cache (Zend\Cache component, for optionally caching feeds between requests)
zendframework/zend-feed suggests installing zendframework/zend-db (Zend\Db component, for use with PubSubHubbub)
zendframework/zend-feed suggests installing zendframework/zend-http (Zend\Http for PubSubHubbub, and optionally for use with Zend\Feed\Reader)
zendframework/zend-feed suggests installing zendframework/zend-servicemanager (Zend\ServiceManager component, for easily extending ExtensionManager implementations)
zendframework/zend-feed suggests installing zendframework/zend-validator (Zend\Validator component, for validating email addresses used in Atom feeds and entries ehen using the Writer subcomponent)
symfony/validator suggests installing symfony/expression-language (For using the 2.4 Expression validator)
symfony/validator suggests installing symfony/intl ()
symfony/validator suggests installing symfony/property-access (For using the 2.4 Validator API)
symfony/serializer suggests installing symfony/property-access (For using the ObjectNormalizer.)
symfony/routing suggests installing symfony/expression-language (For using expression matching)
symfony/dependency-injection suggests installing symfony/expression-language (For using expressions in service container configuration)
symfony/dependency-injection suggests installing symfony/proxy-manager-bridge (Generate service proxies to lazy load them)
paragonie/random_compat suggests installing ext-libsodium (Provides a modern crypto API that can be used to generate random bytes.)
easyrdf/easyrdf suggests installing ml/json-ld (~1.0)
pear/console_table suggests installing pear/Console_Color2 (>=0.1.2)
symfony/var-dumper suggests installing ext-symfony_debug ()
psy/psysh suggests installing ext-pdo-sqlite (The doc command requires SQLite to work.)
drush/drush suggests installing drush/config-extra (Provides configuration workflow commands, such as config-merge.)
phpseclib/phpseclib suggests installing ext-libsodium (SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.)
alchemy/zippy suggests installing guzzle/guzzle (To use the GuzzleTeleporter)
sebastian/global-state suggests installing ext-uopz (*)
phpunit/php-code-coverage suggests installing ext-xdebug (>=2.2.1)
phpunit/phpunit suggests installing phpunit/php-invoker (~1.1)
Writing lock file
Generating autoload files
    Downloading: 100%         
    Downloading: 100%         
    Downloading: 100%         
    Downloading: 100%         
    Downloading: 100%         
    Downloading: 100%         
    Downloading: 100%         
    Downloading: 100%         
    Downloading: 100%         
    Downloading: 100%         
    Downloading: 100%         
    Downloading: 100%         
    Downloading: 100%         
    Downloading: 100%         
    Downloading: 100%         
> DrupalProject\composer\ScriptHandler::createRequiredFiles
Create a sites/default/settings.php file with chmod 0666
Create a sites/default/services.yml file with chmod 0666
Create a sites/default/files directory with chmod 0777

real    7m48.959s
user    0m42.456s
sys 0m15.874s

@jameswilson
Copy link

One more way to speed up composer, which I haven't tried but came up as an option in a meeting I had today with my team was to use the --prefer-dist option when running composer install, which will try to download a zipfile of the correct version instead of the entire git repository for each dependency.

You can code this into your composer.json file, so you don't have to remember this every time with the following snippet:

"config": {
    "preferred-install": "dist"
},

A comment on this post mentions this may only work with packages hosted on GitHub. No word about Drupal.org packages though, so YMMV. Sorry I haven't had a chance to test this out, wanted to reply here before I forgot about this.

@babbarankit
Copy link

I use following composer package and github token to speed up my composer

composer global require hirak/prestissimo
composer config -g github-oauth.github.com <personal_github_auth_token>

@webflo
Copy link
Member

webflo commented Oct 11, 2016

The drupal.org endpoint is much faster than the previous one. Closing for now. I don't have any new insights on this topic.

@webflo webflo closed this as completed Oct 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants