`git status` takes 20 seconds in a big working tree. How do you fix it?
AdvancedProductionMonorepos, large files and repository performance
Answer
Enable the filesystem monitor and untracked cache so Git stops walking every file, enable split index and commit-graph, check for huge untracked directories that need ignoring, and confirm antivirus is excluding .git.
git config core.fsmonitor true
git config core.untrackedCache true
git config feature.manyFiles true
GIT_TRACE_PERFORMANCE=1 git status
More on Monorepos, large files and repository performance
What are the main trade-offs of a monorepo?IntermediateHow do you make CI efficient in a monorepo?AdvancedHow do you onboard developers to a very large repo without a 30-minute clone?IntermediateWhat does Scalar do and when do you recommend it?AdvancedWhen should a team adopt Git LFS and when should it avoid it?IntermediateHow do you control LFS cost and bandwidth in CI?Intermediate