Skip to content
Marvex

Developer productivity

The Compounding Cost of Large Pull Requests

Change size is the most under-discussed variable in software delivery. Nearly every delivery problem a team can name gets worse as the diff gets bigger, and most get better when it shrinks.

An account of how pull request size drives review latency, review quality, rework and incident recovery, and a practical guide to splitting changes without creating a stream of meaningless micro-pull-requests.

Developer ProductivityMarvex EngineeringEngineering Intelligence, Shiprocket12 min read
A large diff of source code displayed across a dark monitor

Why the cost is not linear

The intuition that a 1,000-line change costs about ten times a 100-line change is wrong, and understanding why it is wrong is most of the argument.

Review is not a linear scan. Reviewing a change means building a model of what it does and checking that model against the rest of the system, and the number of interactions to hold in mind grows much faster than the line count. Past some threshold — which varies by person and by domain but is real for everyone — a reviewer stops reasoning about the change as a whole and starts pattern-matching: reading for style, obvious errors and things that look unusual, rather than for whether the design is right. The review still happens. The scrutiny quietly changes character.

Scheduling makes it worse. A 40-line change fits into a gap that already exists in someone’s day. A 900-line change needs a clear block, so it gets deferred until one appears — which is how a large change accumulates days of pickup time before anyone has read a line. That waiting is pure queue, and it is caused entirely by size.

Then the feedback arrives late and expensively. A design problem found in review of a large change means substantial rework of work that has already been built, and the author has usually moved on mentally. The same problem found in a small change is a cheap correction, because less has been built on top of the mistake.

Finally, size damages everything downstream of the merge. Bisecting a regression across a large commit is slower. Reverting is riskier because the change is entangled with other things you want to keep. Attribution of a production issue to a specific change is harder. All four DORA metrics degrade with batch size, which is the same claim the DORA research programme makes about deployment batch size, expressed one level down.

  • Interactions to reason about grow faster than lines changed
  • Past a threshold reviewers pattern-match instead of reasoning
  • Large changes wait for a clear block that may never come
  • Late feedback means rework on work already built
  • Bisect, revert and attribution all get harder after the merge

What size actually predicts

Track pull request size against your own outcomes rather than importing a threshold from a blog post, because the useful number is team-specific and codebase-specific. Marvex reports pull request size alongside cycle time stages and review depth, which makes the relationships directly observable in your own data.

You will typically see four relationships. Larger changes have longer pickup times, for the scheduling reason above. Larger changes attract fewer comments per line changed, which is the pattern-matching effect made visible. Larger changes go through more rework rounds, because late feedback triggers larger corrections. And larger changes are over-represented among the changes that precede an incident.

The fourth relationship needs care in interpretation. Large changes are more likely to be risky work in the first place — migrations, refactors, new subsystems — so some of the correlation is selection rather than causation. That does not undermine the practical conclusion: those are precisely the changes where you most want careful review and easy rollback, and size is working against both.

The single most useful chart here is comments per hundred lines against change size. It is the clearest evidence that review effort does not scale with the diff, and unlike an abstract argument about batch size, it is about your team, from your data, which is what makes it persuasive in a room.

  • Derive your own size thresholds from your own outcome data
  • Expect longer pickup, fewer comments per line, more rework rounds
  • Some size-to-incident correlation is selection, not causation — it still matters
  • Comments per hundred lines versus size is the most convincing single chart

How to split a change that does not want to be split

The objection is always the same, and it is often sincere: this change genuinely cannot be smaller. Sometimes true. Usually there is a seam, and the technique is knowing where to look.

Separate mechanical from semantic. A rename, a file move, a formatting pass or an automated codemod should never share a pull request with a behavioural change — the semantic change becomes invisible in the noise. Ship the mechanical part first, alone, with a note that it is mechanical.

Land the scaffolding before the behaviour. New interfaces, types, configuration, feature flags and database columns can usually merge on their own while doing nothing, and they are trivially reviewable in isolation. The subsequent behavioural change is then small and about one thing.

Use a flag to decouple merging from releasing. This is the general escape hatch: incomplete work can merge behind a disabled flag, so integration happens continuously while exposure is controlled separately. It requires the discipline to remove flags afterwards, which is real work and should be tracked, not assumed.

For migrations, use the expand-and-contract shape: add the new structure, write to both, backfill, move reads, then remove the old structure. Each phase is independently reviewable and independently revertible, which is exactly what a single giant migration commit denies you.

And extract the parts you are confident about. If a change contains 700 lines of clearly correct plumbing and 80 lines of subtle logic, splitting them lets the reviewer spend their whole attention budget on the 80 lines that need it. That is the goal of the whole exercise — not smaller numbers, but attention concentrated where it matters.

  • Never mix mechanical changes with behavioural ones
  • Merge interfaces, types, config and columns before the behaviour
  • Feature flags decouple merging from releasing — and must be cleaned up
  • Expand, migrate, contract: each phase reviewable and revertible
  • Split out the obvious parts so review attention lands on the subtle part

The opposite failure: pull requests that are too small

Splitting has a failure mode, and teams that adopt a size target without understanding the reason will find it quickly. A stream of pull requests each containing one line, with no individually coherent story, is worse than a single medium change: each carries fixed overhead — a review request, a context load, a CI run, a merge — and the reviewer sees fragments without the shape they belong to.

The correct unit is one coherent, reviewable, revertible idea. A reviewer should be able to say what the change does in a sentence, and check whether it does that. That is the test, not a line count.

Watch for the specific pathology where size targets become individual metrics. If a chart of pull requests per engineer appears, changes will be split to move the chart, and the splits will be arbitrary rather than semantic. You will have imported the cost of splitting without any of the benefit — an exact illustration of why per-person counters corrode.

A reasonable practical rule: aim for a change a reviewer can hold in their head in one sitting, prefer smaller when in doubt, and treat a size figure as a prompt to ask whether the change has a seam, never as a rule that blocks a merge.

  • One coherent, reviewable, revertible idea is the correct unit
  • Sub-idea fragments carry fixed overhead and lose the shape
  • Never turn a size target into a per-engineer chart
  • Treat size as a prompt to look for a seam, not as a merge gate

Making the change stick

Do not start with a policy. Start by showing the team its own data: pickup time against size, comments per hundred lines against size, rework rounds against size. Engineers argue with rules and generally accept evidence about their own work, especially when the evidence matches something they already suspected.

Then agree a soft convention rather than a hard gate. A note on large pull requests asking whether there is a seam changes behaviour faster than an automated block, and it avoids the arms race that any gate produces.

Remove the structural reasons changes are large. Long-lived feature branches guarantee large merges, so shorten branch lifetime. Missing feature-flag infrastructure means work cannot merge until it is complete, so build the infrastructure. Environments where merged means released force people to hold work back, so decouple those. If review is slow, engineers batch work to avoid the queue — which is the loop where large changes and slow review sustain each other, and the reason attacking either one helps both.

Then measure the loop closing. Median pull request size, pickup time by percentile and rework rounds should all move together over a couple of months. If size falls and review depth per change falls with it, you have shrunk the diffs without changing anything real, and it is worth finding out why before declaring the practice adopted.

  • Lead with the team’s own data, not with a policy
  • A soft convention beats an automated gate
  • Fix the structural causes: long branches, no flags, merge-equals-release
  • Slow review and large changes reinforce each other — attacking either helps both
pull requestscode reviewbatch sizecycle timechange failure rate

Frequently asked questions

Why are large pull requests harder to review than several small ones?

Because review effort does not scale linearly with lines changed. Reviewing means building a model of what a change does and checking it against the rest of the system, and the number of interactions to hold in mind grows much faster than the diff. Past a threshold, reviewers stop reasoning about the change as a whole and begin pattern-matching for style and obvious errors, so the review still happens but its character quietly changes. Large changes also wait longer to be picked up, because they need a clear block of time rather than fitting into a gap that already exists in someone’s day.

What is a good maximum size for a pull request?

The useful threshold is team-specific and should be derived from your own data rather than imported. Plot pickup time, comments per hundred lines and rework rounds against change size, and look for where the relationships bend — that inflection is your practical ceiling for the codebase and the people reviewing it. As a working heuristic, a pull request should be a single coherent, reviewable, revertible idea that a reviewer can hold in their head in one sitting. Treat any size figure as a prompt to ask whether the change has a seam, not as a hard gate that blocks a merge.

How do I split a change that seems impossible to split?

Look for seams in this order. Separate mechanical changes such as renames, file moves and formatting from behavioural ones, and ship the mechanical part alone. Land scaffolding first — new interfaces, types, configuration, feature flags and database columns can usually merge while doing nothing. Use a feature flag to decouple merging from releasing so incomplete work can integrate continuously behind a disabled flag. For data changes, use expand and contract: add the new structure, write to both, backfill, move reads, then remove the old. Finally, extract the parts you are confident about so review attention concentrates on the genuinely subtle code.

Can pull requests be too small?

Yes. A stream of one-line pull requests with no individually coherent story is worse than one medium change: each carries fixed overhead — a review request, a context reload, a CI run, a merge — and the reviewer sees fragments without the shape they belong to. The correct unit is one coherent, reviewable, revertible idea that a reviewer can describe in a sentence and then verify. This failure mode appears most often when a size target has been turned into a per-engineer chart, at which point changes get split arbitrarily to move the number rather than semantically to aid review.

Does pull request size affect change failure rate?

Pull request size affects everything downstream of the merge. Bisecting a regression across a large commit takes longer, reverting is riskier because the change is entangled with work you want to keep, and attributing a production issue to a specific change is harder — so recovery is slower even when the failure rate is unchanged. Larger changes also tend to be over-represented before incidents, though some of that is selection rather than causation, since risky work such as migrations and refactors tends to be large by nature. That is precisely the case where you most want careful review and an easy rollback, and size works against both.

Why does slow code review cause large pull requests?

Because engineers adapt rationally to a slow queue. If each review round costs two days of waiting, batching more work into a single request reduces the number of round trips, so people hold changes back until they are substantial. The larger change then takes longer to be picked up and longer to review, which makes the queue slower still — a reinforcing loop between change size and review latency. The useful implication is that either end can be attacked: widening the reviewer pool improves size over time, and shrinking changes improves review latency, because both cut into the same loop.

How do you get a team to adopt smaller pull requests?

Show the team its own data before proposing any rule: pickup time against size, comments per hundred lines against size, and rework rounds against size. Engineers argue with policies and generally accept evidence about their own work. Then remove the structural causes rather than mandating behaviour — shorten branch lifetimes, build feature-flag infrastructure so incomplete work can merge safely, decouple merging from releasing, and speed up review so batching stops being rational. A soft convention, such as a prompt on large changes asking whether there is a seam, changes behaviour faster than an automated gate and avoids an arms race.

Keep reading

Marvex

See it on your own delivery data

Connect GitHub, GitLab or Jira and Marvex builds your DORA, cycle-time and sprint views from the history you already have.