Git/Composer slow on Debian

I’ve had an issue with Debian stable for some time that doesn’t occur on other servers with newer kernels. I haven’t found the exact cause of the issue yet, however I have found a workaround that is good enough for my purposes.

Git usually hangs at “resolving deltas” and installing dependencies with composer takes way longer then it should and compared with running the same command on ubuntu, there is a very big difference in completion time.

For me the solution was to add the –prefer-dist option to composer, this makes it so that composer downloads compressed tarballs instead of checking out the code. Composer now completes in less then 30 seconds on Debian, before it was taking more like 30 minutes.

You may need to delete the contents of your vendor directory before running this command.

, ,

Leave a Reply

Your email address will not be published. Required fields are marked *