Pull request size
Also called PR size or change size
Pull request size is how much a single pull request changes, usually counted as lines added plus lines deleted, sometimes with the number of files touched alongside it. It is the strongest available predictor of how long a change waits for review.
How it is measured
Additions plus deletions across the diff. Simple, and the simplicity is why it travels: every code host reports it, no configuration is required, and nobody has to remember to label anything.
Two adjustments make it substantially more honest:
Exclude what nobody reads. Lockfiles, generated clients, snapshots, minified bundles, vendored dependencies and binary assets can multiply a diff by ten without adding a line a reviewer will look at. A package-lock.json update is not a 4,000-line change in any sense that matters.
Track file count alongside it. One file changed by 300 lines and 60 files changed by 5 lines each are the same number and completely different reviews. A rename sweep is enormous and trivial; a rewritten scheduler is small and hard.
Why it is worth watching
Pull request size is the closest thing code review has to a leading indicator. It is known at the moment a change is opened, before any of the outcomes it predicts have happened, which is what makes it actionable in a way that cycle time is not.
Here is what it looked like on the Coderbuds team's own repository across 431 pull requests merged in a recent 90-day window:
| Size | Median time to merge |
|---|---|
| Tiny | 8.6 hours |
| Small | 9.4 hours |
| Medium | 18.1 hours |
| Large | 87.6 hours |
Median size across all of them was 241 lines.
The shape of that table is the finding, not the exact hours. Tiny and small are indistinguishable — a reviewer picks up either one in the same sitting. Medium roughly doubles. Then large is not a further doubling but a tenfold jump, because a change that size stops being something a reviewer fits into a gap and becomes something they have to schedule. That is one working day against three and a half.
The practical consequence: shaving lines off an already-small pull request buys almost nothing. Keeping one change out of the large bucket buys days.
What it misses
It says nothing about risk. A one-line change to a payment path deserves more scrutiny than a 400-line test refactor. Any team that reads size as a proxy for danger will systematically under-review its most dangerous changes.
It is trivially gamed. Once size appears on a dashboard, the incentive is to split. Splitting a coherent change into six pull requests that cannot be understood separately produces six small numbers and one much worse review, and the metric will report an improvement.
Mechanical changes distort it. A framework upgrade, a rename, or a formatter run touches thousands of lines that require no judgement at all. Without classifying that work separately, a single migration week will move a quarterly average and mean nothing.
Median hides the problem. Size distributions are heavily skewed. Most of the review pain sits in the top few per cent of changes, and a median is specifically designed not to show you those. Watch p75 and p90, or watch the count of changes above a threshold you have agreed.
How to read it well
Compare the team to itself. Cross-team benchmarks for pull request size are close to meaningless, because size depends on language, on the age of the codebase, and on how much generated code the stack produces.
Count changes over a threshold rather than tracking an average. "Four pull requests over 1,000 lines last month" is a sentence someone can act on. "Average PR size increased 6%" is not.
Check size against merge time on your own data before adopting anyone's target, including the one above. If your large changes merge as fast as your small ones, you have a review culture that already handles them and sizing is not your constraint.
And treat a rising median as a question, not a verdict. It can mean review discipline is slipping. It can equally mean the team stopped shipping behind feature flags, or absorbed a migration, or started building something genuinely bigger. The number tells you where to look, not what you will find.
Frequently asked questions
What is a good pull request size?
Most teams land somewhere between 200 and 400 changed lines as a median, and the useful target is your own median rather than a published number. What matters more than the level is the tail: a team with a 200-line median and a handful of 3,000-line pull requests has a review problem concentrated in a few changes, not a sizing problem across the board.
How is pull request size calculated?
Additions plus deletions across the diff, usually with generated files, lockfiles, vendored dependencies and binary assets excluded, because none of those are read by a reviewer. Some teams weight test files lower for the same reason. File count is tracked alongside it, since twenty files changed by one line each reads very differently from one file changed by twenty.
Why do large pull requests take longer to review?
Partly because there is more to read, but mostly because they are deferred. A reviewer with twenty minutes will pick up a 50-line change and leave a 900-line one for later, and later competes with the next day's work. The delay is queueing, not reading, which is why the relationship between size and merge time is far steeper than linear.
Does a smaller pull request mean better code?
No. Size is a proxy for reviewability, not for quality, and it is gameable — splitting one coherent change across six pull requests that only make sense together makes review harder, not easier. The question a size metric should prompt is whether a reviewer can hold the change in their head, not whether the number is small.
Related
- Code churn Code churn is code that is rewritten or deleted shortly after it was written, usually within a few weeks, by the person who wrote it. It is distinct from ordinary change to old code, which is just maintenance.
- Cycle time In software delivery, cycle time is how long a change takes from the moment work starts on it to the moment it reaches production. It is the internal counterpart to lead time, which starts its clock when the customer asks rather than when the team begins.
- Read: What is a pull request complete guide →
- Read: Advanced code review strategies large teams →