Home  >  Article  >  Development Tools  >  [Composer package sharing] hirak/prestissimo enables multi-process downloading for Composer install/update

[Composer package sharing] hirak/prestissimo enables multi-process downloading for Composer install/update

藏色散人
藏色散人forward
2019-08-19 14:29:282577browse

The composer usage tutorial column 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

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 by composer domestic 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:

hirak/prestissimo

Installation:

composer global require hirak/prestissimo (请使用全局安装)

Use:

composer install/update Any 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

[Composer package sharing] hirak/prestissimo enables multi-process downloading for Composer install/update

It took 29s after use

[Composer package sharing] hirak/prestissimo enables multi-process downloading for Composer install/update

For more technical articles on composer usage, please visit the composer command usage graphic tutorial column!

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!

Statement:
This article is reproduced at:learnku.com. If there is any infringement, please contact admin@php.cn delete