Hoping someone can help; my VS Code Git functions are all taking quite a long time compared to previously. I've suffered through it a while now but getting a bit fed-up (hence the post) but unfortunately can't pin-point a date it started.
My output console for Git shows a lot of processes taking over 1000ms, up to 3800ms for certain functions. Individually it's not a big deal, but all together it's now slowing my commit process down to a good 30 odd seconds each so I'm getting sloppy with my commits.
I have no idea where to go from here; I've updated to the latest version of VS Code which hasn't made a difference.
I've manually tried staging and committing changes via the git bash CLI and it runs as normal with everything operating in under 0.6ms.
Here is my VSCode git output when doing a simple commit; a lot of extra commands running compared to what I would do manually, but even the first line of add is over 1s
[2022-10-17T23:15:35.215Z] > git add -A -- . [1037ms]
[2022-10-17T23:15:37.232Z] > git -c user.useConfigOnly=true commit --quiet --allow-empty-message --file - [1536ms]
[2022-10-17T23:15:38.937Z] > git status -z -uall [1223ms]
[2022-10-17T23:15:39.818Z] > git ls-files --stage -- C:\Code\temp\strapi-frontend\test4.txt [1291ms]
[2022-10-17T23:15:40.864Z] > git symbolic-ref --short HEAD [1272ms]
[2022-10-17T23:15:41.849Z] > git cat-file -s e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 [1405ms]
[2022-10-17T23:15:42.950Z] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/main refs/remotes/main [1400ms]
[2022-10-17T23:15:44.462Z] > git show --textconv :test4.txt [1969ms]
[2022-10-17T23:15:45.115Z] > git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname) [1505ms]
[2022-10-17T23:15:45.583Z] > git remote --verbose [1120ms]
[2022-10-17T23:15:47.084Z] > git config --get commit.template [1012ms]
[2022-10-17T23:15:48.536Z] > git config --get commit.template [970ms]
And here is via the command line
$ git add test3.txt
00:11:21.377977 read-cache.c:2303 performance: 0.000341300 s: read cache .git/index
00:11:21.378973 name-hash.c:600 performance: 0.000015000 s: initialize name hash
00:11:21.378973 dir.c:2369 performance: 0.000189100 s: read directory
00:11:21.378973 diff-lib.c:251 performance: 0.000008100 s: diff-files
00:11:21.380457 read-cache.c:3030 performance: 0.000506700 s: write index, changed mask = 28
00:11:21.381449 trace.c:475 performance: 0.006232800 s: git command: 'C:\Program Files\Git\mingw64\bin\git.exe' add test3.txt
git
jonco@JON-DESKTOP (main)
$ git commit -m "Test git via CLI again"
00:11:33.121011 read-cache.c:2303 performance: 0.000124200 s: read cache .git/index
00:11:33.123987 read-cache.c:1617 performance: 0.001619800 s: refresh index
00:11:33.125471 cache-tree.c:444 performance: 0.001810500 s: cache_tree_update
00:11:33.125967 read-cache.c:3030 performance: 0.000484900 s: write index, changed mask = 20
00:11:33.129442 unpack-trees.c:1548 performance: 0.000017000 s: traverse_trees
00:11:33.129442 unpack-trees.c:1645 performance: 0.000033400 s: unpack_trees
00:11:33.129442 diff-lib.c:537 performance: 0.000143700 s: diff-index
00:11:33.129442 cache-tree.c:444 performance: 0.000071500 s: cache_tree_update
00:11:33.627922 trace.c:475 performance: 0.002758800 s: git command: git gc --auto
[main 13c670a] Test git via CLI again
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 test3.txt
00:11:33.630895 trace.c:475 performance: 0.514299600 s: git command: 'C:\Program Files\Git\mingw64\bin\git.exe' commit -m 'Test git via CLI again'
Anyone got any tips?