Why is PHP Composer so slow?

前端 未结 13 2119
攒了一身酷
攒了一身酷 2021-01-29 19:03

Why is PHP Composer so slow when all I do is init a project with zero dependencies? Here are the commands I run:

composer init

13条回答
  •  南方客
    南方客 (楼主)
    2021-01-29 19:30

    The same here. Get more details with "composer install --profile -vvv". In my case it takes a long time to download a few JSON files. They get cached on my server, but they are still downloaded with every Composer update/install call.

    ... 30 minutes later ...

    It looks like some performance problem @packagist.org. Now the Composer install runs within 2 seconds! And downloaded JSON files are properly cached.

提交回复
热议问题