Home  >  Article  >  Development Tools  >  Composer multi-threaded download component changes composer install update slow problem

Composer multi-threaded download component changes composer install update slow problem

藏色散人
藏色散人forward
2019-08-31 14:06:372269browse

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!

Composer multi-threaded download component changes composer install update slow problem

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 :

Composer multi-threaded download component changes composer install update slow problem

Composer multi-threaded download component changes composer install update slow problem

Composer multi-threaded download component changes composer install update slow problem

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!

Statement:
This article is reproduced at:segmentfault.com. If there is any infringement, please contact admin@php.cn delete
Previous article:What does composer mean?Next article:What does composer mean?