In the issue (#3156) discussion "composer is very slow" on the Composer GitHub page is suggested to
re-define the packagist repo with a https:// url in the global config using:
$ composer config --global repo.packagist composer https://packagist.org
That should work around the downgrade issue, but it'd be interesting to resolve it of course.
It really brings a appreciable speed boost. I've just tested this for Zend Framework 2 (see test below).
How does it work? (Why does disabling of the allow_ssl_downgrade
option make the process faster?)
EDIT
I run composer create-project zendframework/zendframework
combining two factors: cache and the re-defining the packagist repo with turning allow_ssl_downgrade
off. I got following results for the resulting four cases:
Default configs:
config: default ([repositories.packagist.url] https?://packagist.org, [repositories.packagist.allow_ssl_downgrade] true)
cache: empty (composer clear-cache)
result: 3m38s
config: default ([repositories.packagist.url] https?://packagist.org, [repositories.packagist.allow_ssl_downgrade] true)
cache: not empty
result: 54s
config: changed ([repositories.packagist.url] https://packagist.org)
cache: empty (composer clear-cache)
result: 3m34s
config: changed ([repositories.packagist.url] https://packagist.org)
cache: not empty
result: 56s
Summary: The "trick" with disabling allow_ssl_downgrade
brings no speed boost.
Nevertheless it would be nice to know: What does the allow_ssl_downgrade
option actually do? (What does this "downgrading" mean? What are the advantages and disadvantages?)