Pinterest: How a One-line Change Decreased Our Build Times by 99%
Original post How a One-line Change Decreased Our Build Times by 99%
Article Summary
Continue reading
What This Article Covers
Pinterest's CI pipelines were pulling all 2,500+ branches from their Pinboard monorepo during checkout, even though the repo was 20GB with 350K+ commits. They had already tried shallow clones and limiting commits to the last 50, but it wasn't enough.
The Engineering Productivity team fixed it by adding a refspec parameter to their Git fetch config. Instead of fetching all branch refs with +refs/heads/*:refs/remotes/origin/*, they specified only the master branch.
Clone times for Pinboard dropped from 40 minutes to 30 seconds. That's a 99% reduction. With 60K+ daily git pulls running through their CI pipelines, the faster builds made a real difference.
This page summarizes “How a One-line Change Decreased Our Build Times by 99%” by Pinterest, published Mar 15, 2020. All credit for the original work goes to the authors.