composer: Installing / updating dependencies seems very slow
Hi there. I seem to have some issue with the Installing or Updating dependencies steps taking forever. To isolate my issue somewhat, I created a new directory, use the latest composer at the moment (19bfd6c7
), and put this composer.json, nothing else:
{
"require": {
"php": ">=5.4",
"zendframework/zendframework": "2.*",
"doctrine/doctrine-orm-module": "0.*"
},
"require-dev": {
"zendframework/zend-developer-tools": "dev-master"
}
}
First output:
$ php composer.phar install --profile
[3.1MB/0.37s] Loading composer repositories with package information
[3.4MB/0.90s] Installing dependencies
[37.7MB/64.18s] - Installing zendframework/zendframework (2.1.4)
[37.7MB/64.19s] [37.7MB/66.89s] Downloading: 0%[37.7MB/66.89s] [38.0MB/67.45s] Downloading:[38.2MB/67.57s] Downloading:[38.5MB/67.72s] Downloading:[38.8MB/68.02s] Downloading:[39.1MB/68.28s] Downloading:[39.3MB/68.43s] Downloading:[39.6MB/68.66s] Downloading:[39.9MB/68.91s] Downloading:[40.2MB/69.07s] Downloading:[40.4MB/69.34s] Downloading:[40.7MB/69.58s] Downloading:[41.0MB/69.82s] Downloading:[41.3MB/70.10s] Downloading:[41.5MB/70.41s] Downloading:[41.8MB/70.70s] Downloading:[42.1MB/70.98s] Downloading:[42.4MB/71.28s] Downloading:[42.6MB/71.54s] Downloading: 90%[42.9MB/71.84s] Downloading:[43.2MB/72.09s] Downloading:[43.2MB/72.13s] Downloading: 100%[43.2MB/72.13s]
[37.7MB/79.99s]
[37.7MB/80.01s] - Installing doctrine/common (2.3.0)
[37.7MB/80.01s] [37.7MB/81.07s] Downloading: 0%[37.7MB/81.07s] [37.7MB/81.20s] Downloading:[37.7MB/81.23s] Downloading:[37.8MB/81.31s] Downloading:[37.8MB/81.31s] Downloading:[37.8MB/81.39s] Downloading:[37.8MB/81.40s] Downloading:[37.8MB/81.44s] Downloading:[37.8MB/81.47s] Downloading:[37.8MB/81.48s] Downloading:[37.9MB/81.52s] Downloading:[37.9MB/81.52s] Downloading:[37.9MB/81.55s] Downloading:[37.9MB/81.60s] Downloading:[37.9MB/81.61s] Downloading:[37.9MB/81.63s] Downloading:[37.9MB/81.63s] Downloading:[37.9MB/81.64s] Downloading: 100%[37.9MB/81.64s]
[37.7MB/82.17s]
[37.7MB/82.69s] - Installing doctrine/dbal (2.3.3)
[37.7MB/82.70s] [37.7MB/83.82s] Downloading: 0%[37.7MB/83.82s] [37.7MB/84.06s] Downloading:[37.8MB/84.12s] Downloading:[37.8MB/84.20s] Downloading:[37.8MB/84.22s] Downloading:[37.8MB/84.36s] Downloading:[37.9MB/84.37s] Downloading:[37.9MB/84.52s] Downloading:[37.9MB/84.53s] Downloading:[37.9MB/84.61s] Downloading:[38.0MB/84.62s] Downloading:[38.0MB/84.69s] Downloading:[38.0MB/84.76s] Downloading:[38.0MB/84.77s] Downloading:[38.0MB/84.84s] Downloading:[38.1MB/84.85s] Downloading:[38.1MB/84.92s] Downloading:[38.1MB/84.93s] Downloading:[38.1MB/85.00s] Downloading: 95%[38.1MB/85.01s] Downloading: 100%[38.1MB/85.02s]
[37.7MB/85.61s]
[37.7MB/85.63s] - Installing symfony/console (v2.2.1)
[37.7MB/85.63s] [37.7MB/86.83s] Downloading: 0%[37.7MB/86.83s] [37.7MB/86.99s] Downloading:[37.8MB/87.02s] Downloading:[37.8MB/87.10s] Downloading:[37.8MB/87.15s] Downloading:[37.8MB/87.15s] Downloading: 100%[37.8MB/87.15s]
[37.7MB/87.50s]
[37.7MB/87.53s] - Installing doctrine/orm (2.3.3)
[37.7MB/87.53s] [37.7MB/88.60s] Downloading: 0%[37.7MB/88.61s] [37.8MB/88.85s] Downloading:[37.8MB/88.93s] Downloading:[37.9MB/89.01s] Downloading:[37.9MB/89.09s] Downloading:[38.0MB/89.14s] Downloading:[38.0MB/89.22s] Downloading:[38.1MB/89.26s] Downloading:[38.1MB/89.33s] Downloading:[38.2MB/89.40s] Downloading:[38.3MB/89.46s] Downloading:[38.3MB/89.50s] Downloading:[38.4MB/89.57s] Downloading:[38.4MB/89.65s] Downloading:[38.5MB/89.72s] Downloading:[38.5MB/89.76s] Downloading:[38.6MB/89.82s] Downloading:[38.6MB/89.89s] Downloading:[38.7MB/89.95s] Downloading: 90%[38.7MB/90.00s] Downloading:[38.8MB/90.06s] Downloading:[38.8MB/90.06s] Downloading: 100%[38.8MB/90.06s]
[37.7MB/91.28s]
[37.7MB/91.31s] - Installing doctrine/doctrine-module (0.7.1)
[37.7MB/91.31s] [37.7MB/92.42s] Downloading: 0%[37.7MB/92.42s] [37.7MB/92.58s] Downloading:[37.8MB/92.75s] Downloading:[37.8MB/92.78s] Downloading:[37.8MB/92.83s] Downloading:[37.8MB/92.86s] Downloading: 100%[37.8MB/92.86s]
[37.7MB/93.24s]
[37.7MB/93.27s] - Installing doctrine/doctrine-orm-module (0.7.0)
[37.7MB/93.27s] [37.7MB/94.42s] Downloading: 0%[37.7MB/94.43s] [37.7MB/94.58s] Downloading:[37.7MB/94.62s] Downloading:[37.8MB/94.85s] Downloading:[37.8MB/94.85s] Downloading:[37.8MB/94.85s] Downloading:[37.8MB/94.93s] Downloading:[37.9MB/95.09s] Downloading:[37.9MB/95.10s] Downloading:[37.9MB/95.10s] Downloading:[37.9MB/95.10s] Downloading: 100%[37.9MB/95.10s]
[37.7MB/95.30s]
[17.8MB/96.57s] zendframework/zendframework suggests installing ircmaxell/random-lib (Fallback random byte generator for Zend\Math\Rand if OpenSSL/Mcrypt extensions are unavailable)
[17.8MB/96.58s] zendframework/zendframework suggests installing pecl-weakref (Implementation of weak references for Zend\Stdlib\CallbackHandler)
[17.8MB/96.59s] zendframework/zendframework suggests installing zendframework/zendpdf (ZendPdf for creating PDF representations of barcodes)
[17.8MB/96.60s] zendframework/zendframework suggests installing zendframework/zendservice-recaptcha (ZendService\ReCaptcha for rendering ReCaptchas in Zend\Captcha and/or Zend\Form)
[17.8MB/96.61s] doctrine/orm suggests installing symfony/yaml (If you want to use YAML Metadata Mapping Driver)
[17.8MB/96.62s] doctrine/doctrine-module suggests installing doctrine/data-fixtures (Data Fixtures if you want to generate test data or bootstrap data for your deployments)
[17.8MB/96.63s] doctrine/doctrine-orm-module suggests installing zendframework/zend-developer-tools (zend-developer-tools if you want to profile operations executed by the ORM during development)
[17.8MB/96.64s] doctrine/doctrine-orm-module suggests installing doctrine/migrations (doctrine migrations if you want to keep your schema definitions versioned)
[17.9MB/96.75s] Writing lock file
[17.9MB/96.75s] Generating autoload files
Memory usage: 17.9MB (peak: 48.73MB), time: 96.77s
Then:
$ php composer.phar update --profile
[3.2MB/0.90s] Loading composer repositories with package information
[3.5MB/1.52s] Updating dependencies (including require-dev)
[38.6MB/65.96s] - Installing zendframework/zend-developer-tools (dev-master 3994622)
[38.6MB/65.99s] Cloning 3994622761f496b666a143156b4d21f19205aa66
[38.6MB/67.64s]
[17.6MB/68.84s] zendframework/zend-developer-tools suggests installing bjyoungblood/bjy-profiler (Version: dev-master, allows the usage of the (Zend) Db collector.)
[17.9MB/69.30s] Writing lock file
[17.9MB/69.31s] Generating autoload files
Memory usage: 17.64MB (peak: 38.7MB), time: 69.37s
And finally
$ php composer.phar update --profile
[3.2MB/0.43s] Loading composer repositories with package information
[3.5MB/0.81s] Updating dependencies (including require-dev)
[39.0MB/58.74s] Nothing to install or update
[18.3MB/60.22s] Generating autoload files
Memory usage: 18.02MB (peak: 39.02MB), time: 60.3s
Is this expected behaviour to take roughly 60 seconds to determine whether there is updates, even if there are no actual updates? I notice in htop that php
has very high CPU usage during this time (90-100%)
I don’t suspect a problem with network connectivity or slowness:
$ wget https://packagist.org/p/packages-2013-04.json--2013-04-17 14:58:05-- https://packagist.org/p/packages-2013-04.json
Resolving packagist.org (packagist.org)... 37.59.4.156
Connecting to packagist.org (packagist.org)|37.59.4.156|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/json]
Saving to: `packages-2013-04.json'
[ <=> ] 1,029,324 2.87M/s in 0.3s
2013-04-17 14:58:06 (2.87 MB/s) - `packages-2013-04.json' saved [1029324]
Downloading this JSON from packagist took 0.3s. I just did a speedtest.net check, we have 15ms ping, 73 Mbps down and 32 Mbps up.
The environment I’m running in is Ubuntu 12.04 server, running in a VM on ESX servers, 1 CPU with 2GB RAM.
About this issue
- Original URL
- State: closed
- Created 11 years ago
- Comments: 20 (9 by maintainers)
I add
“require-dev”: { “zendframework/zend-developer-tools”: “dev-master” }
to composer.json and i run
composer update and it throw this exception:
Loading composer repositories with package information Updating dependencies (including require-dev)
Installing zendframework/zend-developer-tools (dev-master 23bcd78) Cloning 23bcd78e80bd963f08b125d80587a640ad7a237d
[RuntimeException] Failed to clone https://github.com/zendframework/ZendDeveloperTools.git, gi t was not found, check that it is installed and in your PATH env.
‘git’ is not recognized as an internal or external command, operable program or batch file.
Please help me install it. Thanks