DEV Community

Cover image for Cool Tools: Speed Up Composer v1.x Installations
Amburi Roy
Amburi Roy

Posted on

Cool Tools: Speed Up Composer v1.x Installations

Composer is a dependency manager for PHP. It helps you to install and manage the libraries your project needs. composer v2.x has improved the performance significantly than composer v1.x. However, if you're still using composer v1.x, you can use the hirak/prestissimo plugin to speed up the installation process.

What is hirak/prestissimo?

It's a Composer 1.x plugin that downloads packages in parallel to speed up the installation process. By default, Composer downloads packages one at a time. This can be slow, especially if you are installing a lot of packages. hirak/prestissimo allows you to download packages in parallel, which can significantly reduce the installation time.

Useful links:

How to install

composer global require hirak/prestissimo
Enter fullscreen mode Exit fullscreen mode

This will install the plugin globally, so you can use it with all of your projects.

How to use

composer install -o
Enter fullscreen mode Exit fullscreen mode

This will tell Composer to use hirak/prestissimo to download the packages.

How much it speed up dependency installations?

In some benchmarks, it has been shown to speed up Composer installations by up to 10 times.

For example, a benchmark by dotdev: https://dotdev.co/speed-up-composer-with-prestissimo/ found that it reduced the installation time of a project with 200 dependencies from 288 seconds to 26 seconds

Wrap-Up

hirak/prestissimo is a simple and effective way to speed up Composer installations. If you are using composer v1.x, I recommend installing this plugin to improve the performance of your installations.

Happy Coding!

Top comments (0)