VS Code Git Perf Data Collection
Please run these from the exact repo/worktree folder where VS Code is slow.
First confirm in external terminal Git is fast:
pwd
which git
git --version
time git rev-parse --show-toplevel
time git rev-parse --git-dir --git-common-dir --show-superproject-working-tree
time git for-each-ref --sort=-committerdate --format='%(refname)%00%(objectname)%00%(*objectname)' >/dev/null
time git status -z -uall >/dev/null
git for-each-ref --format='%(refname)' | wc -l
git worktree list | wc -lThen collect VS Code startup CPU profiles:
code . --new-window --prof-startup --log trace --log vscode.git:trace
After VS Code finishes opening, wait until the modal dialog pops up, then close VS Code. Please share the generated profile files, usually in your home directory, named like:
~/prof-*.main.cpuprofile.txt
~/prof-*.renderer.cpuprofile.txt
~/prof-*.extHost.cpuprofile.txt
Then collect Git trace logs in VS Code without startup profiling:
GIT_TRACE2_PERF=1 code . --new-window --log trace --log vscode.git:traceAfter the slow Git behavior happens, open:
Output panel -> Git
Copy the full Git output and share it as text.
Optional isolation run:
GIT_TRACE2_PERF=1 code . --new-window --disable-extensions --log trace --log vscode.git:traceIf this run is fast, the issue is likely caused by an extension blocking activation or the extension host event loop.