TheLedger

Engineering

How we cut build times in half without changing the stack

By Dana Okoro · 14 June 2026 · 6 min read

Our CI runs had crept past eleven minutes. Nobody could point to a single commit that broke the camel's back — it was a thousand small decisions, each one defensible, accumulating into something nobody wanted to defend. The tempting move was to rip out the bundler and start over. We did the boring thing instead, and the builds are now under five minutes.

The lesson, if there is one, is that the stack was never the problem. The problem was that we had stopped looking at it. Performance regressions are quiet. They don't fail tests. They don't open issues. They just add seconds, and the seconds add up, and one morning you realise you've started checking Slack while the spinner spins.

Start by measuring, not guessing

Before we touched a single config file, we added timing instrumentation to every stage of the pipeline. Not a fancy dashboard — a flat log, one line per step, written to a place we could actually read. Within a day we had data on a hundred builds, and the picture was not what anyone expected.

The dependency install step, which everyone assumed was negligible, was eating two minutes on its own. Type-checking ran twice because two scripts both invoked it and nobody had noticed. A single test file, imported by accident into the wrong suite, was pulling in a quarter of the codebase on every run.

"The fastest code is the code you never run. The second fastest is the code you can see." — from the team retro, May 2026

None of these were exotic problems. They were ordinary problems that had survived because nothing made them visible. Once the timings were in front of us, the fixes were almost embarrassing — a cached install here, a deduplicated script there, a lazy import where a eager one had quietly bloated the graph.

We shipped the changes in small batches over two weeks, watching the log after each one. The line trended down, then down again, then levelled at a place that felt honest. No rewrite. No new tool. Just attention, applied where it had been missing.