HOW WE SHRUNK OUR JAVASCRIPT MONOREPO GIT SIZE BY 94%
A Microsoft team working with a massive JavaScript monorepo (1JS) faced a challenge: the repository size had ballooned to 178GB. The issue stemmed from two key problems: keeping thousands of files in a single folder and a flawed packing algorithm that led to inefficient compression of files with similar names, especially CHANGELOG files. To address the folder issue, the team implemented a pull request and automated cleanup pipelines. The packing issue was tackled by repacking the repo with a larger window and utilizing a new path-walk algorithm, resulting in a reduction from 178GB to 5GB.