VelocinatorVelocinator
DX5 min read

Optimizing the 'Inner Loop' for Developers

April 5, 2025

When we talk about velocity, we often talk about "Lead Time"—the days it takes to ship a feature. But for the individual developer, the most critical metric is the speed of the Inner Loop.

The Inner Loop is: Code -> Build -> Test -> Debug.

It happens hundreds of times a day. If this loop takes 5 seconds, the developer is in a flow state. They experiment, they iterate, they create. If this loop takes 5 minutes, they check Twitter. They lose context. They get frustrated.

The Compounding Cost of Slowness

Let's do the math. Say a developer runs their local tests 20 times a day.

  • Scenario A (10 seconds): 200 seconds = ~3 minutes wasted.
  • Scenario B (5 minutes): 100 minutes = ~1.5 hours wasted.

That's nearly 20% of the workday lost to waiting. But the cognitive cost is higher. The "context switching penalty" means that every time they wait 5 minutes, it takes another 10 minutes to get back into deep thought.

How to optimize the Inner Loop

1. Local Dev Environment

Does your app require 15 microservices to be running locally just to change a button color? Invest in mocking. Use tools like Docker Compose efficiently, or better yet, enable developers to run a "hybrid" mode where they run one service locally and connect to a cloud dev environment for the rest.

2. Test Selection

Don't run the entire integration suite on every file save. Configure your tooling (Jest, Pytest, etc.) to only run tests related to the changed files. Shift the heavy, slow tests to the CI pipeline (the Outer Loop).

3. Hot Module Replacement (HMR)

If you're doing frontend work, HMR is non-negotiable. Waiting for a full page reload breaks flow. Ensure your build tooling (Vite, Turbopack, etc.) is tuned correctly.

Monitoring the Inner Loop

It's hard to measure local build times centrally. But you can listen to your team. If you hear complaints about "my laptop is melting" or "waiting for the build," treat that as a P0 infrastructure bug.

Invest in your platform engineering. Saving every developer 30 minutes a day is likely the highest ROI work you can do this quarter.

Enjoyed this article?

Start measuring your own engineering velocity today.

Start Free Trial