Slow updating of composer dependencies, despite --prefer-dist flag

后端 未结 10 1744
走了就别回头了
走了就别回头了 2020-12-22 18:42

Why does it take up to two minutes for my composer dependencies to update, even when there have been no changes?

A popular suggestion is to append the --prefer-

10条回答
  •  一向
    一向 (楼主)
    2020-12-22 19:17

    Seems like the problem was resolved, but this might help someone.

    Whenever I ran composer install or update, it took more than 10 seconds just to fetch the https://packagist.org/packages.json file. Eventually I found out that the problem was related to IPv6, since fetching files from IPv4 sites took less than a second.
    The problem is that my ISP doesn't support IPv6, but I had it enabled in my ethernet properties. After I unticked Internet Protocol Version 6 (TCP/IPv6) in my network settings, install/update speeds drastically improved (dropped from 200+ seconds to like 10)

提交回复
热议问题