Home>Article>Development Tools> [Composer package sharing] hirak/prestissimo enables multi-process downloading for Composer install/update
Thecomposer usage tutorialcolumn below will share a Composer package with you. I hope it will be helpful to friends who need it!
![[Composer package sharing] hirak/prestissimo enables multi-process downloading for Composer install/update](http://m.sbmmt.com/img/upload/article/000/000/020/5d5a418ca6c81425.jpg)
I believe that everyone is often tortured by the annoying network environment in China. In order to install dependency packages, you have to build a ladder or something. Although it is supported bycomposerdomestic mirroring, because composer is a single-process download, it is sometimes surprisingly slow. For example, a simple initial installation of laravel takes several minutes. Because node's npm tool allows for parallel downloading of multiple processes, the downloading efficiency is very high, so I curiously went to Google and searched to see if there was a way for composer to download dependency packages in parallel with multiple processes. The result is true. Here is Amway's guide. Everyone.
github address:
Installation:
composer global require hirak/prestissimo (请使用全局安装)
Use:
composer install/updateAny scenario that requires a large number of installation dependencies will automatically take effect.
Of course, in order to better use composer, it is also recommended to change to the domestic image, and then install a composer image switching toolslince/composer-registry-manager
Effect:
Compared with installing a complete laravel project when the cache is completely cleared
It took 122s before use
![1566195946351528.png [Composer package sharing] hirak/prestissimo enables multi-process downloading for Composer install/update](http://m.sbmmt.com/img/upload/image/312/983/175/1566195946351528.png)
It took 29s after use
![1566195950701067.png [Composer package sharing] hirak/prestissimo enables multi-process downloading for Composer install/update](http://m.sbmmt.com/img/upload/image/308/771/299/1566195950701067.png)
For more technical articles on composer usage, please visit thecomposer command usage graphic tutorialcolumn!
The above is the detailed content of [Composer package sharing] hirak/prestissimo enables multi-process downloading for Composer install/update. For more information, please follow other related articles on the PHP Chinese website!