← All posts
LinkedIn

    87GB to 20GB: The Real Cost of a Bloated Monorepo

    Dropbox's monorepo hit 87GB. A fresh clone took over an hour. CI paid that toll on every job. They were months away from GitHub's 100GB hard limit.

    The obvious suspect? Big files. Committed binaries. Generated junk that snuck past .gitignore.

    None of it. That's the part that makes this story worth your time.

    The real culprit was a compression heuristic almost nobody thinks about.

    Git saves space by storing files as deltas — diffs against a "similar" file instead of a full copy. To decide which files are similar, it uses a shortcut: the last 16 characters of the file path.

    Now look at Dropbox's translation files:

    i18n/metaserver/[language]/LC_MESSAGES/[filename].po

    The language code lives early in the path. The last 16 characters? Basically identical across every language. So Git kept pairing French against Japanese, computing deltas between files that had nothing in common.

    Every routine translation update produced a bloated pack file. The repo ballooned — not because of what they stored, but how it was stored.

    The fix was a server-side repack with tuned window and depth parameters (done with GitHub, since GitHub controls how packs get built). Nine hours of compute. 87GB down to 20GB. Clone times from an hour to under 15 minutes.

    Same code. Same history. A quarter of the size.

    A few things I keep coming back to:

    • Hidden costs don't announce themselves. Nobody gets paged for "suboptimal delta pairing." It just quietly taxes every clone, every CI run, every new hire's first day.
    • Every tool ships with assumptions baked in. Git's 16-character heuristic worked exactly as designed. It just didn't match one directory structure — and the mismatch compounded for years.
    • Growth isn't the same as usage. The repo grew far faster than the actual work justified. That gap was the signal. They just had to know to look at the compression layer instead of the commit log.

    The scariest scaling problems aren't the ones that crash. They're the ones that slow everything down by 10% a quarter until an hour-long clone feels normal.

    What's the "that's just how long it takes" cost hiding in your stack right now?

    Source: https://dropbox.tech/infrastructure/reducing-our-monorepo-size-to-improve-developer-velocity

    See more on LinkedIn ↗