Code checkout in CircleCI 2.0 extremly slow


Hi there!

I’m occasionally seeing very high ‘Checkout code’ times:

Even normally our ‘Checkout code’ times are around 2 minutes. Is the repository being cached in CircleCI and then the diff for a particular branch pulled? If this were the case I’d imagine the ‘Checkout code’ step would be quicker. Or is the entire repo being retrieved from Github?



A checkout is likely to be a clone, so yes, it’d be a whole branch. However, you can speed this up by swapping the checkout for a manual Git clone using the shallow option. See git clone --help on how to do that.

That said, your checkout does seem to be very long though.


I don’t believe we control the git command that clones the repository from the config.yml. In the config.yml we specify checkout with a path.


Indeed, but my point is that you can remove that, and replace it with your own git command, in order to do a shallow clone. I don’t believe checkout supports shallow cloning.


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.