netz98/n98-magerun — pull request #333 by fooman (2014-05-19 09:41:14+00:00)
Title: Install from cached vcs

Composer is able to cache downloaded files by default into the .composer directory in the user's HOME directory. Unfortunately it does not do this for repositories, see for example https://github.com/composer/composer/pull/1338.

This pull request changes the download location for git and hg repositories to a cached location under $HOME/.composer/_n98_magerun_download during the InstallCommand and avoids the copyThenRemove command.

For second installs I am getting the following time improvements:

real 3m49.229s
user 0m17.068s
sys 0m3.022s

vs

real 0m51.583s
user 0m9.027s
sys 0m1.088s

The PR leaves the current behaviour for tar/zip dist downloads unchanged.