Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 composer/composer#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:
vs
The PR leaves the current behaviour for tar/zip dist downloads unchanged.