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-
Factors that can slow down Composer:
As pointed out, xdebug can affect the performance of Composer. Running composer diagnose will also warn you about this.
Running update instead of install. People too often just run update constantly. This makes Composer go through the entire dependency resolving process, regardless of whether or not anything has changed. When you run install, Composer takes the requirements directly from your .lock file, skipping the dependency resolving process. You should only run update during the development lifecycle of your application. And even then, it's not something you have to run daily usually.
If you have a specific dependency that you update frequently yourself, you could try simplifying the process by running composer update vendor/package --with-dependencies instead.
Setting minimum-stability to dev. This greatly expands the amount of possibilities that the dependency resolver has to consider. You should almost never lower the minimum-stability to dev unless you absolutely have no other choice. Look into alternatives, such as temporarily using a inline @dev flag.