Should you enlarge your PRs?

The empirical laws of how long it takes to review and release a pull request depending on its size. We inferred them from 100,000 pull requests to commercial closed-source repositories belonging to our software development analytics SaaS clients.

Vadim Markovtsev
8 min readJun 10, 2021

I like to read posts that describe software development best practices. It’s fun to compare your own experience with other people’s. I admit that I don’t always follow them since so many authors like to position their findings as flawless and unexceptionable. My 15 years of software engineering have taught me that everything is a compromise, and every decision depends on the context. And the context is often different from another FAANG’s insight. Anyway, there is one specific best practice that is hard to argue with.

Good developers don’t create big PRs.

Developers should review no more than 200 to 400 lines of code (LOC) at a time.

… the optimal pull request size is small.

Make smaller pull requests.

— Various citations [1] [2] [3] [4].

Intuitively, the quality and duration of a code review of 10 LOC vary drastically from 10k LOC. The probability of failing the unit tests in the CI grows correspondingly. Big PR size is often a consequence of several features melded together, which hinders the granular…

--

--

Vadim Markovtsev

Machine learning and software engineer. Development teams manager. Public speaker. Google Developer Expert in Machine Learning (2018–2021).