The Git index is a critical data structure in Git, but it can be very large in monorepos. It was a performance bottleneck for years until we found a way to shrink it: the sparse index.
https://github.blog/2021-11-10-make-your-monorepo-feel-small-with-gits-sparse-index/