youtube image
From YouTube: Improving git status performance in Uber's Go monorepo - Git Merge 2022

Description

Presented by Zhongpeng Lin

As the size of Uber's Go monorepo grows, Git commands are getting slower and slower. We address the issue from two fronts:

(1) Sparse checkout: we developed a tool that allow users to specify a list of directories that they need to change, the tool calls bazel query to discover all files in the repository needed to build projects in the given directories and checks out the directories and their dependencies. The tool maintains a private work tree to run Bazel queries and a work tree for each sparse checkout.

(2) FS Monitor: we can share some git performance data without any fsmonitor, with Watchman, with daemon, on macOS vs on Linux for those who are not using sparse checkout