W
W
wir_wolf2016-01-15 16:16:09
Composer
wir_wolf, 2016-01-15 16:16:09

Slow composer speed, or the ability to install one lib?

Good day. I've been using composer for a few months now and I can't figure out why it's so slow.
for example. I have projects. I have already installed all the libraries that are in composer.json. After some time, I need to add 1 library. I copy it to composer.json and do composer insatll again. But the library is not installed as composer.lock. Now I have 2 options, delete this file, and run the installation again. Or do a composer update. In both cases, this process takes a very long time. For the sake of installing 1 library, you have to put it on update, and wait (smoke) for 10-15 minutes until composer does something.
My hardware is not weak
Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz
8GB DDR3 1600
Silicon Power Slim S55 SP060GBSS3S55S25
Is there any way to install one library added to composer.json without affecting this long process?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Kulikovsky, 2016-01-15
@wir_wolf

Long because the composer checks all package dependencies, and packages have many more dependencies, as a rule.
If you need to update one lib, use:
You can also add the "--prefer-dist" parameter, then composer will try to install the lib from the archive, and not clone the repository.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question