An exciting update on diff and merge performance
Aug 17, 2021Dan Tao

Summary
This post details specific optimizations implemented to improve Bitbucket Cloud's diff response times by 40% and reduce timeouts by an order of magnitude through in-memory processing. It also outlines improvements to pull request merge execution times, including streamlining pre- and post-receive hooks (e.g., removing stale ref lock file cleanup from synchronous flow, moving ref packing to a background hook), reducing aggressive locking by refactoring merge code to leverage Git's built-in consistency mechanisms, and fixing a bug in the background task scheduling library that caused worker idleness during peak traffic, leading to wall times tracking closer to execution times.