The following column composer usage tutorial will explain to you the problem of Composer multi-threaded download component changing composer install update slowly. I hope it will be helpful to friends in need!
Prerequisite: Use composer’s domestic image settings
composer config -g repo.packagist composer //packagist.phpcomposer.com
Otherwise you will be blocked, no matter how many threads you use, it will be in vain. ~
Multi-threaded download
By default, composer installation components are single-threaded and installed one by one. Once any component is slow in the middle, it will be delayed. In large quantities.
The method to implement multi-threaded downloading is very simple, which is to install a global plug-in, hirak/prestissimo
It is said that the running score effect can be reduced from the original 288s to 26s , it’s a bit unbelievable, but whatever, as long as it’s faster than the original, just install it~
Global installation
composer global require hirak/prestissimo
After that, you can composer install or update, and this is what it looks like :
The above is the detailed content of Composer multi-threaded download component changes composer install update slow problem. For more information, please follow other related articles on the PHP Chinese website!