Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git extremely slow even though running the same commands manually is very fast #171016

Open
Tracked by #203279
CherryDT opened this issue Jan 10, 2023 · 11 comments
Open
Tracked by #203279
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug git GIT issues perf

Comments

@CherryDT
Copy link

CherryDT commented Jan 10, 2023

Type: Bug

Any action in Git takes ages (minutes). The Git output window shows that each command which VSCode executes takes 3-20 seconds (!). However, if I manually copy those commands into the console, they execute almost instantly, so it's unclear where all that time gets wasted.

I'm on Remote WSL1.

Here is an excerpt from the log:

2023-01-11 00:45:47.260 [info] > git config --get commit.template [21372ms]
2023-01-11 00:45:50.374 [info] > git cat-file -s ec66a5ca6862f6404423cad5184bc7e8efece6d2 [6145ms]
2023-01-11 00:45:50.375 [info] > git cat-file -s c15071bbe817bf8cb54447a374d215ed6eff8356 [9197ms]
2023-01-11 00:45:50.375 [info] > git ls-files --stage -- /mnt/c/Users/david/proj/***/providers/***.js [12280ms]
2023-01-11 00:46:02.771 [info] > git show --textconv :app/Controllers/Http/UserApiController.js [3140ms]
2023-01-11 00:46:02.772 [info] > git ls-files --stage -- /mnt/c/Users/david/proj/***/app/Models/***.js [12399ms]
2023-01-11 00:46:05.906 [info] > git cat-file -s 266be854aff5cfef7db907825d9072c68d44f57b [18646ms]
2023-01-11 00:46:05.915 [info] > git show --textconv :app/Controllers/Http/MainController.js [3146ms]
2023-01-11 00:46:05.918 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/fix refs/remotes/fix [9394ms]
2023-01-11 00:46:11.961 [info] > git cat-file -s afc1ef2584ad53e301b38acf58efc92935fe39b7 [18454ms]
2023-01-11 00:46:14.993 [info] > git status -z -uall [6058ms]
2023-01-11 00:46:14.995 [info] > git cat-file -s 8ebecd9ed5aabcdd2c4e99953cfc67c55d64e98f [9090ms]
2023-01-11 00:46:18.038 [info] > git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname) [6073ms]
2023-01-11 00:46:21.318 [info] > git show --textconv :app/Lib/***/index.js [6326ms]
2023-01-11 00:46:21.318 [info] > git show --textconv :providers/***.js [3286ms]
2023-01-11 00:46:21.331 [info] > git show --textconv :app/Models/***.js [15ms]
2023-01-11 00:52:38.010 [info] > git add -A -- /mnt/c/Users/david/proj/***/providers/***.js [16ms]
2023-01-11 00:52:41.215 [info] > git config --get commit.template [10ms]
2023-01-11 00:52:44.336 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/fix refs/remotes/fix [12ms]
2023-01-11 00:53:04.795 [info] > git status -z -uall [17511ms]
2023-01-11 00:53:07.817 [info] > git ls-files --stage -- /mnt/c/Users/david/proj/***/providers/***.js [3027ms]
2023-01-11 00:53:11.251 [info] > git ls-files --stage -- /mnt/c/Users/david/proj/***/app/Controllers/Http/MainController.js [9540ms]
2023-01-11 00:53:14.289 [info] > git ls-files --stage -- /mnt/c/Users/david/proj/***/app/Controllers/Http/UserApiController.js [15471ms]
2023-01-11 00:53:17.181 [info] > git ls-files --stage -- /mnt/c/Users/david/proj/***/app/Lib/***/index.js [21258ms]
2023-01-11 00:53:20.076 [info] > git ls-files --stage -- /mnt/c/Users/david/proj/***/app/Models/***.js [26988ms]
2023-01-11 00:53:23.031 [info] > git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname) [32787ms]
2023-01-11 00:53:23.045 [info] > git cat-file -s 266be854aff5cfef7db907825d9072c68d44f57b [2970ms]
2023-01-11 00:53:23.046 [info] > git cat-file -s ec66a5ca6862f6404423cad5184bc7e8efece6d2 [5866ms]
2023-01-11 00:53:23.046 [info] > git cat-file -s c15071bbe817bf8cb54447a374d215ed6eff8356 [8760ms]
2023-01-11 00:53:23.047 [info] > git cat-file -s e33676f2c6486c28944c0876103198ac763c6952 [11797ms]
2023-01-11 00:53:23.048 [info] > git cat-file -s 8ebecd9ed5aabcdd2c4e99953cfc67c55d64e98f [18ms]
2023-01-11 00:53:23.063 [info] > git -c user.useConfigOnly=true commit --quiet --allow-empty-message --file - [15250ms]

VS Code version: Code 1.74.3 (97dec17, 2023-01-09T16:59:02.252Z)
OS version: Windows_NT x64 10.0.19045
Modes:
Sandboxed: No
Remote OS version: Linux x64 4.4.0-19041-Microsoft

System Info
Item Value
CPUs AMD Ryzen 7 PRO 4750U with Radeon Graphics (16 x 1697)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Load (avg) undefined
Memory (System) 31.23GB (4.81GB free)
Process Argv
Screen Reader no
VM 0%
Item Value
Remote WSL: Ubuntu-20.04
OS Linux x64 4.4.0-19041-Microsoft
CPUs AMD Ryzen 7 PRO 4750U with Radeon Graphics (16 x 1700)
Memory (System) 31.23GB (4.81GB free)
VM 0%
Extensions (65)
Extension Author (truncated) Version
auto-close-tag for 0.5.14
vscode-graphql-syntax Gra 1.0.5
dotenv mik 1.0.1
vscode-aql mon 1.7.0
jupyter-keymap ms- 1.0.0
remote-containers ms- 0.266.1
remote-ssh ms- 0.94.0
remote-ssh-edit ms- 0.84.0
remote-wsl ms- 0.72.0
remote-explorer ms- 0.0.3
ejs-language-support Qas 0.0.1
vscode-todo-highlight way 1.0.5
vscode-devdocs akf 1.0.3
svelte-intellisense ard 0.7.1
vscode-intelephense-client bme 1.9.3
npm-intellisense chr 1.4.4
js-codeformer cms 2.6.1
compulim-vscode-closetag Com 1.2.0
vscode-eslint dba 2.2.6
devdocs dei 0.2.0
vscode-new-file dku 4.0.2
dbux-code Dom 0.7.9
xml Dot 2.5.1
EditorConfig Edi 0.16.4
copilot Git 1.65.7705
vscode-graphql-execution Gra 0.1.6
vscode-graphql-syntax Gra 1.0.5
vscode-git-blamer how 1.1.2
join-comment-aware joh 0.0.3
solidity Jua 0.0.141
edge luo 0.3.2
rainbow-csv mec 3.5.0
csharp ms- 1.25.2
vscode-dotnet-runtime ms- 1.6.0
isort ms- 2022.8.0
python ms- 2022.20.1
vscode-pylance ms- 2023.1.10
jupyter ms- 2022.11.1003412109
jupyter-keymap ms- 1.0.0
jupyter-renderers ms- 1.0.12
vscode-jupyter-cell-tags ms- 0.1.6
vscode-jupyter-slideshow ms- 0.1.5
cpptools ms- 1.13.9
hexeditor ms- 1.9.9
hexeditor not 1.8.2
vscode-print pdc 0.10.20
svelte-extractor pro 0.0.3
vscode-data-preview Ran 2.3.0
vscode-data-table Ran 1.12.0
vscode-yaml red 1.11.0
ActiveFileInStatusBar Ros 1.0.3
vscode-paste-and-indent Rub 0.0.8
bracket-jumper sas 1.1.8
trailing-spaces sha 0.4.1
vscode-standard sta 2.1.3
runme sta 0.4.2
vscode-stripe str 2.0.14
ignore-gitignore stu 1.0.1
svelte-vscode sve 107.0.1
es6-string-html Tob 2.12.0
sort-***s Tyr 1.9.1
use-strict-everywhere vee 0.1.3
bracket-padder via 0.3.0
change-case wma 1.0.0
html-css-class-completion Zig 1.20.0
@lszomoru
Copy link
Member

@CherryDT, thank you very much for filling this issue and for including the logs. Looking at the notes, I see that you are using WSL and you are opening your files from the Windows file system (ex: /mnt/c/). When it comes to file system operations, it is recommended that you store your files on the Linux file system and not on the Windows file system. Could you please opening your folder/workspace from the Linux file system and see if performance improves? Thank you!

@lszomoru lszomoru added git GIT issues WSL Issue when using WSL labels Jan 20, 2023
@CherryDT
Copy link
Author

CherryDT commented Jan 20, 2023

Hi, this is WSL1 and not WSL2 so it's less of an issue and I had no problems with it until recently, also as I mentioned running the exact same commands manually in the terminal is lightning fast so that can't be the problem. Right now usong VolFS is not an option for me for these projects due to how everything is set up in my development flow. Since this felt like a regression I was hoping it could be fixed.

@lszomoru
Copy link
Member

I am not aware of any recent changes that might be causing such behaviour but assuming that this is indeed a regression I was wondering if you would be able to provide the latest version of VS Code or the WSL extension in which you were not seeing the performance degradation. That will help me track down the change that caused the regression. Thanks!

@smrfeld
Copy link

smrfeld commented Apr 16, 2023

Same issue but not on WSL, on Ubuntu 20.04

@lughino
Copy link

lughino commented May 15, 2023

Same issue on mac os ventura.
In my case, it takes minutes. If I perform a rebase, the entire vscode freeze for minutes.
I appreciate this is a hard issue to solve, but I saw several issues opened and then closed and locked by the bot without a resolution. I really hope this issue would get prioritised accordingly and tackled once for all

@chscott
Copy link

chscott commented May 20, 2023

Same symptoms for me but on Windows. I'm happy to help diagnose the problem, but I'll need direction.

@chapus
Copy link

chapus commented Jun 10, 2023

Same issue,

2023-06-10 00:40:51.412 [info] > git cat-file -s 86c9c23b95b903a9376c0ea724183eb7a1193f2d [5495ms]
2023-06-10 00:40:51.412 [info] > git cat-file -s 137fa6e4ee75496a57cbcf263c73761b3c7c67fa [5504ms]
2023-06-10 00:40:51.413 [info] > git cat-file -s ab7c890b053250eb89845a421c9768f1509f32d5 [5518ms]
2023-06-10 00:40:51.413 [info] > git cat-file -s b6a5275d8ca215bf788fae927a75529c3eed656c [5525ms]
2023-06-10 00:40:51.413 [info] > git cat-file -s 042a416132a71b65bec79c4064cfd30689182ff5 [5531ms]

I read maybe removing git from windows credential manager...

@chscott
Copy link

chscott commented Aug 3, 2023

I'm not sure what changed, but git interaction has been massively better over the last month or so.

image

@lszomoru lszomoru added perf bug Issue identified by VS Code Team member as probable bug and removed WSL Issue when using WSL labels Dec 6, 2023
@haudan
Copy link

haudan commented Dec 20, 2023

Not for me on 1.85.1, it's still extremely slow.

Edit: never mind, I've figured it out. I was working on the WSL but through the Windows-native VSCode. That is to say I didn't have the WSL extension installed. After installing the extension and updating git (can't hurt), everything is buttery smooth.

@br3ndonland
Copy link

Same issue on mac os ventura. In my case, it takes minutes. If I perform a rebase, the entire vscode freeze for minutes. I appreciate this is a hard issue to solve, but I saw several issues opened and then closed and locked by the bot without a resolution. I really hope this issue would get prioritised accordingly and tackled once for all

I'm with @lughino, I'm still seeing this issue and would like it to be addressed instead of dismissed and locked. I'm on macOS 14.2.1 Sonoma with VSCode 1.85.1 and Git 2.43.0.

Here are some example logs from today (expand).
2024-01-07 10:14:53.951 [info] > git ls-tree -l HEAD -- /Users/brendon/.dotfiles/Brewfile [19ms]
2024-01-07 10:14:53.951 [info] > git show --textconv HEAD:Brewfile [21ms]
2024-01-07 10:16:43.181 [info] > git add -A -- /Users/brendon/.dotfiles/Brewfile [9ms]
2024-01-07 10:16:43.187 [info] > git config --get commit.template [4ms]
2024-01-07 10:16:43.189 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) --ignore-case refs/heads/main refs/remotes/main [5ms]
2024-01-07 10:16:43.195 [info] > git status -z -uall [5ms]
2024-01-07 10:16:44.336 [info] > git config --get commit.template [3ms]
2024-01-07 10:16:44.336 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) --ignore-case refs/heads/main refs/remotes/main [4ms]
2024-01-07 10:16:44.341 [info] > git status -z -uall [4ms]
2024-01-07 10:16:44.438 [info] > git ls-files --stage -- /Users/brendon/.dotfiles/Brewfile [4ms]
2024-01-07 10:16:44.443 [info] > git cat-file -s 6d880aa1b09e77ac9405096d945066b671e0b919 [5ms]
2024-01-07 10:16:44.448 [info] > git show --textconv :Brewfile [4ms]
2024-01-07 10:16:44.769 [info] > git ls-files --stage -- /Users/brendon/.dotfiles/README.md [4ms]
2024-01-07 10:16:44.770 [info] > git show --textconv :README.md [6ms]
2024-01-07 10:16:44.773 [info] > git cat-file -s 6e94cdd4381fcdad04a9db99a8bf568f5a769c6b [4ms]
2024-01-07 10:16:49.155 [info] > git ls-files --stage -- /Users/brendon/.dotfiles/README.md [6ms]
2024-01-07 10:16:49.159 [info] > git cat-file -s 6e94cdd4381fcdad04a9db99a8bf568f5a769c6b [4ms]
2024-01-07 10:16:49.165 [info] > git show --textconv :README.md [5ms]
2024-01-07 10:16:49.357 [info] > git config --get commit.template [6ms]
2024-01-07 10:16:49.358 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) --ignore-case refs/heads/main refs/remotes/main [4ms]
2024-01-07 10:16:49.364 [info] > git status -z -uall [5ms]
2024-01-07 10:16:54.383 [info] > git config --get commit.template [7ms]
2024-01-07 10:16:54.383 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) --ignore-case refs/heads/main refs/remotes/main [5ms]
2024-01-07 10:16:54.389 [info] > git status -z -uall [5ms]
2024-01-07 10:17:27.765 [info] > git show --textconv :.git/COMMIT_EDITMSG [4ms]
2024-01-07 10:17:27.766 [info] > git ls-files --stage -- /Users/brendon/.dotfiles/.git/COMMIT_EDITMSG [5ms]
2024-01-07 10:17:28.051 [info] > git check-ignore -v -z --stdin [8ms]
2024-01-07 10:25:15.314 [info] > git config --get commit.template [8ms]
2024-01-07 10:25:15.317 [info] > git ls-files --stage -- /Users/brendon/.dotfiles/.git/COMMIT_EDITMSG [8ms]
2024-01-07 10:25:15.318 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) --ignore-case refs/heads/main refs/remotes/main [12ms]
2024-01-07 10:25:15.330 [info] > git show --textconv :.git/COMMIT_EDITMSG [6ms]
2024-01-07 10:25:15.332 [info] > git status -z -uall [12ms]
2024-01-07 10:25:38.167 [info] > git config --get commit.template [7ms]
2024-01-07 10:25:38.168 [info] > git ls-files --stage -- /Users/brendon/.dotfiles/.git/COMMIT_EDITMSG [7ms]
2024-01-07 10:25:38.169 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) --ignore-case refs/heads/main refs/remotes/main [7ms]
2024-01-07 10:25:38.177 [info] > git show --textconv :.git/COMMIT_EDITMSG [6ms]
2024-01-07 10:25:38.181 [info] > git status -z -uall [11ms]
2024-01-07 10:25:40.410 [info] > git ls-files --stage -- /Users/brendon/.dotfiles/README.md [4ms]
2024-01-07 10:25:40.412 [info] > git show --textconv :README.md [6ms]
2024-01-07 10:25:40.415 [info] > git cat-file -s 6e94cdd4381fcdad04a9db99a8bf568f5a769c6b [4ms]
2024-01-07 10:25:51.311 [info] > git config --get commit.template [4ms]
2024-01-07 10:25:51.312 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) --ignore-case refs/heads/main refs/remotes/main [4ms]
2024-01-07 10:25:51.318 [info] > git status -z -uall [5ms]
2024-01-07 10:25:51.335 [info] > git merge-base refs/heads/main refs/remotes/origin/main [4ms]
2024-01-07 10:25:51.341 [info] > git rev-list --count --left-right refs/heads/main...refs/remotes/origin/main [5ms]
2024-01-07 10:25:51.410 [info] > git ls-files --stage -- /Users/brendon/.dotfiles/README.md [4ms]
2024-01-07 10:25:51.415 [info] > git cat-file -s 6e94cdd4381fcdad04a9db99a8bf568f5a769c6b [5ms]
2024-01-07 10:25:51.420 [info] > git show --textconv :README.md [4ms]
2024-01-07 10:25:56.328 [info] > git config --get commit.template [3ms]
2024-01-07 10:25:56.329 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) --ignore-case refs/heads/main refs/remotes/main [4ms]
2024-01-07 10:25:56.337 [info] > git status -z -uall [7ms]
2024-01-07 10:37:55.192 [info] > git show --textconv HEAD:scripts/install-starship.sh [22ms]
2024-01-07 10:37:55.192 [info] > git ls-tree -l HEAD -- /Users/brendon/.dotfiles/scripts/install-starship.sh [23ms]
2024-01-07 10:37:58.025 [info] > git ls-files --stage -- /Users/brendon/.dotfiles/scripts/install-starship.sh [3ms]
2024-01-07 10:37:58.026 [info] > git show --textconv :scripts/install-starship.sh [5ms]
2024-01-07 10:39:02.874 [info] > git ls-tree -l HEAD -- /Users/brendon/.dotfiles/vscode/extensions/marketplace-open-vsx.txt [18ms]
2024-01-07 10:39:02.875 [info] > git show --textconv HEAD:vscode/extensions/marketplace-open-vsx.txt [19ms]
2024-01-07 10:39:03.363 [info] > git check-ignore -v -z --stdin [4ms]
2024-01-07 10:39:09.527 [info] > git clean -f -q -- /Users/brendon/.dotfiles/scripts/install-starship.sh [5ms]
2024-01-07 10:39:09.534 [info] > git checkout -q -- /Users/brendon/.dotfiles/vscode/extensions/marketplace-open-vsx.txt [6ms]
2024-01-07 10:39:09.541 [info] > git config --get commit.template [4ms]
2024-01-07 10:39:09.543 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) --ignore-case refs/heads/main refs/remotes/main [6ms]
2024-01-07 10:39:09.549 [info] > git status -z -uall [5ms]
2024-01-07 10:39:10.670 [info] > git config --get commit.template [4ms]
2024-01-07 10:39:10.671 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) --ignore-case refs/heads/main refs/remotes/main [4ms]
2024-01-07 10:39:10.676 [info] > git status -z -uall [4ms]
2024-01-07 10:39:10.770 [info] > git ls-tree -l HEAD -- /Users/brendon/.dotfiles/vscode/extensions/marketplace-open-vsx.txt [5ms]
2024-01-07 10:39:10.776 [info] > git show --textconv HEAD:vscode/extensions/marketplace-open-vsx.txt [4ms]
2024-01-07 10:39:11.126 [info] > git ls-files --stage -- /Users/brendon/.dotfiles/scripts/install-starship.sh [3ms]
2024-01-07 10:39:11.127 [info] > git show --textconv :scripts/install-starship.sh [5ms]
2024-01-07 10:39:12.421 [info] > git ls-files --stage -- /Users/brendon/.dotfiles/README.md [5ms]
2024-01-07 10:39:12.422 [info] > git show --textconv :README.md [7ms]
2024-01-07 10:39:12.426 [info] > git cat-file -s 6e94cdd4381fcdad04a9db99a8bf568f5a769c6b [4ms]
2024-01-07 10:39:15.692 [info] > git config --get commit.template [6ms]
2024-01-07 10:39:15.693 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) --ignore-case refs/heads/main refs/remotes/main [5ms]
2024-01-07 10:39:15.699 [info] > git status -z -uall [5ms]
2024-01-07 10:43:33.882 [info] > git check-ignore -v -z --stdin [4ms]
2024-01-07 10:43:42.448 [info] > git ls-files --stage -- /Users/brendon/.dotfiles/Brewfile [4ms]
2024-01-07 10:43:42.449 [info] > git show --textconv :Brewfile [5ms]
2024-01-07 10:43:42.452 [info] > git cat-file -s 6d880aa1b09e77ac9405096d945066b671e0b919 [3ms]
2024-01-07 10:43:49.703 [info] > git config --get commit.template [7ms]
2024-01-07 10:43:49.705 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) --ignore-case refs/heads/main refs/remotes/main [7ms]
2024-01-07 10:43:49.711 [info] > git status -z -uall [5ms]
2024-01-07 10:43:59.757 [info] > git config --get commit.template [5ms]
2024-01-07 10:43:59.758 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) --ignore-case refs/heads/main refs/remotes/main [6ms]
2024-01-07 10:43:59.763 [info] > git status -z -uall [4ms]
2024-01-07 10:43:59.860 [info] > git ls-files --stage -- /Users/brendon/.dotfiles/Brewfile [5ms]
2024-01-07 10:43:59.865 [info] > git cat-file -s 71bde04e7f439a8f1cafd4510bb43385b1d61b88 [4ms]
2024-01-07 10:43:59.877 [info] > git show --textconv :Brewfile [5ms]
2024-01-07 10:44:04.782 [info] > git config --get commit.template [8ms]
2024-01-07 10:44:04.783 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) --ignore-case refs/heads/main refs/remotes/main [7ms]
2024-01-07 10:44:04.789 [info] > git status -z -uall [5ms]
2024-01-07 10:44:24.028 [info] > git ls-files --stage -- /Users/brendon/.dotfiles/.git/COMMIT_EDITMSG [6ms]
2024-01-07 10:44:24.028 [info] > git show --textconv :.git/COMMIT_EDITMSG [6ms]
2024-01-07 10:44:56.865 [info] > git config --get commit.template [10ms]
2024-01-07 10:44:56.865 [info] > git ls-files --stage -- /Users/brendon/.dotfiles/.git/COMMIT_EDITMSG [9ms]
2024-01-07 10:44:56.877 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) --ignore-case refs/heads/main refs/remotes/main [20ms]
2024-01-07 10:44:56.882 [info] > git show --textconv :.git/COMMIT_EDITMSG [14ms]
2024-01-07 10:44:56.896 [info] > git status -z -uall [17ms]
2024-01-07 10:45:16.033 [info] > git config --get commit.template [7ms]
2024-01-07 10:45:16.034 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) --ignore-case refs/heads/main refs/remotes/main [7ms]
2024-01-07 10:45:16.040 [info] > git status -z -uall [5ms]
2024-01-07 10:45:16.332 [info] > git ls-files --stage -- /Users/brendon/.dotfiles/Brewfile [3ms]
2024-01-07 10:45:16.333 [info] > git show --textconv :Brewfile [5ms]
2024-01-07 10:45:16.337 [info] > git cat-file -s 71bde04e7f439a8f1cafd4510bb43385b1d61b88 [4ms]
2024-01-07 10:45:18.109 [info] > git ls-files --stage -- /Users/brendon/.dotfiles/Brewfile [5ms]
2024-01-07 10:45:18.115 [info] > git cat-file -s 71bde04e7f439a8f1cafd4510bb43385b1d61b88 [5ms]
2024-01-07 10:45:18.122 [info] > git show --textconv :Brewfile [5ms]
2024-01-07 10:45:21.050 [info] > git config --get commit.template [4ms]
2024-01-07 10:45:21.052 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) --ignore-case refs/heads/main refs/remotes/main [6ms]
2024-01-07 10:45:21.058 [info] > git status -z -uall [5ms]
2024-01-07 10:45:21.079 [info] > git merge-base refs/heads/main refs/remotes/origin/main [9ms]
2024-01-07 10:45:21.089 [info] > git rev-list --count --left-right refs/heads/main...refs/remotes/origin/main [8ms]

The repo is br3ndonland/dotfiles. VSCode settings are in that repo here and the .gitconfig is here.

git status -z -uall seems to be one of the slowest steps, frequently taking 20-30 seconds. The Git docs say, "Because it takes extra work to find untracked files in the filesystem, this mode may take some time in a large working tree." I've found that it's slow with or without untracked files present.

@AndreiMiculita
Copy link

I can confirm it hangs after git status -z -uall (or something that comes after it, as it says git status -z -uall (2ms)). It disables pretty much all IDE functionality while waiting for that to finish, it's a nightmare.

@CHINOBKLING CHINOBKLING mentioned this issue Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug git GIT issues perf
Projects
None yet
Development

No branches or pull requests

10 participants