composer/composer — Issue #271: Slow PEAR Channel handling where many package versions exist
Author: padraic
Created: 2012-01-31 18:38:44+00:00
State: open

Composer seems to have a penchant for being greedy in collecting PEAR package details - it collects them for all packages even where they are completely unrelated to the package or package version being installed. Chief suspect is the loop at line 78 and HTTP request (one per loop, i.e. one per package) at line 90 of Composer/Respository/PearRepository.php. For channels with a large range of available versions (PHPUnit is an excellent example) this loopy behaviour can take a very long time.

I'll look into a solution over the next few days unless someone else beats me to it ;). There should be some scope for filtering what this class is doing based on the actual version (or version range) Composer has been told to install.