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

藏色散人
Release: 2019-08-31 14:06:37
forward
2251 people have browsed it

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
Copy after login

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
Copy after login

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!

Related labels:
source:segmentfault.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!