All workCase 01 / 03

20 minutes to 5: less waiting, more shipping

Builds at the agency took 20 minutes. I reworked the pipeline and its automation scripts, and now they take 5.

Context
Digital Agency
Role
Senior Frontend Developer
When
2023
Stack
GitHub Actions · Yarn
Before: 20mAfter: 5m

CI/CD build time, before and after: −75%.

01 · The problem

Push a one-line fix, then wait 20 minutes to see it live. That was every fix, review and release. We fit 2–3 builds into a day, and the 2–3 frontend developers who needed to deploy took turns in the queue.

02 · Constraints

Same runner budget, same deploy target, same team habits. Releases couldn't pause while I fixed it.

03 · What I did

  1. Swap the package manager

    The old npm setup was the slowest step. Moving to a newer Yarn and tidying the packages did most of the cut.

  2. Frozen lockfile in CI

    The lockfile is committed and CI installs exactly what it lists, so the build can't drift back to slow.

04 · Result

  • 20m → 5m
    build time per run (−75%)
  • 2–3 → 6–8
    builds a day

05 · What I’d do differently

Measure first. My hunch that npm was the slowest step turned out right, but it was still a hunch. Next time I'd time every step before changing anything, so data picks the fix.

Next caseSafer.Hardening auth on the frontend