Git perf and scale
Nov 2, 2016Matt Cooper

Summary
This post details three specific performance and scale improvements for Git operations within Team Services: 1. Significant speedup of pull request merges (64% reduction in median merge time for a large test repo) by adopting a newer LibGit2 version and altering its caching strategy. 2. Rewriting a ref lookup from O(N) to O(1) behavior, improving performance for displaying branch names on the web. 3. Designing and implementing a fast, compact representation of the Git graph to track file history, replacing a 90GB SQL table with an in-memory representation on application tier machines, leading to significant database space savings and improved performance.