Composer 2 performance tests - Shopware & TYPO3

Composer2 has been released last weekend and was announced as being much faster than previous versions. As I had some projects, where composer was pretty slow, I was curious how v2 impacts my daily work and how much of an improvement it really is. Let's say this first: It's really impressive and has already improved my work life a lot.

Curious? Let's look at numbers.

The Setup - TYPO3 & Shopware

I'm working a lot in Shopware or TYPO3 projects, so these two come naturally. I'm using:

  • Shopware 6.3 Production Template (6.3 branch)
  • TYPO3 CMS Core Master with 5 custom extensions (v11 dev)

As my problem wasn't download speed but rather dependency resolving, I made sure to pre-warm composer caches (by basically doing all tests twice).

Executed commands

I did for both systems with Composer 2 and Composer 1.10:

composer install --profile --no-scripts
composer update --profile --with-all-dependencies --no-scripts

!!!
!!! --profile will display memory and timing info
!!! --no-scripts because I'm interested in the composer performance, not in whatever scripts either Shopware or TYPO3 provide in addition

The results

TYPO3 Composer Performance

Composer Time Memory Memory (peak)
v1 Install 6.9s 4.85 MiB 6.51 MiB
v2 Install 3.92 7.97 MiB 10.5 MiB
v1 Update 16.19s 385.51 MiB 786.47 MiB
v2 Update 3.19s 27.06 MiB 138.64 MiB

Shopware Composer Performance

Composer Time Memory Memory (peak)
v1 Install 8s 7.56 MiB 22.02 MiB
v2 Install 4.5s 12.64 MiB 26.96 MiB
v1 Update 26.4s 439.47 MiB 1149.51 MiB
v2 Update 5.66s 28.99 MiB 244.27 MiB

As you can see, especially updates are benefiting massively from the improvements - both time- and memory-wise.

The Results - In pictures

Don't like numbers? Here are some pictures ;)

TYPO3 Composer Performance Charts

Shopware Composer Performance Charts

More

Big thanks to everyone involved in making Composer 2 happen!