When I run git pull after not having run it for a while (1+ days), it is very slow. It's usually only pulling down less than 10 commits when I do this. The commits are usually a handful of text changes. So not a lot of data.
I don't think my git repo is particularly large:
$ git count-objects -vH
count: 581
size: 3.49 MiB
in-pack: 182841
packs: 41
size-pack: 198.89 MiB
prune-packable: 5
garbage: 0
size-garbage: 0 bytes
Here is the output of a very slow git pull, with GIT_CURL_VERBOSE=1 and GIT_TRACE=1 enabled.
Any suggestions where to look? The run-command line at 15:46:26.738053 seems to be the slow one (almost two minutes). I found suggestions about how git uses curl under the hood, so changing some http/post settings might help. But I'm connecting using ssh, not http.
BTW it sat quite a while on that slow line before writing the remote: Enumerating objects... output. So I don't think the remote: Enumerating objects and the lines that follow are the slow part.
Thanks.
me@WindowsLaptop MINGW64 /C/Inetpub/wwwroot (main)
$ GIT_CURL_VERBOSE=1 GIT_TRACE=1 git pull
15:46:26.426537 exec-cmd.c:237 trace: resolved executable dir: C:/Program Files/Git/mingw64/bin
15:46:26.439334 git.c:460 trace: built-in: git pull
15:46:26.446456 run-command.c:655 trace: run_command: git fetch --update-head-ok
15:46:26.693052 exec-cmd.c:237 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
15:46:26.707053 git.c:460 trace: built-in: git fetch --update-head-ok
15:46:26.738053 run-command.c:655 trace: run_command: unset GIT_PREFIX; GIT_PROTOCOL=version=2 ssh -o SendEnv=GIT_PROTOCOL -p 7999 [email protected] 'git-upload-pack '\''/web/webapps.git'\'''
remote: Enumerating objects: 488, done.
remote: Counting objects: 100% (488/488), done.
remote: Compressing objects: 100% (441/441), done.
15:48:24.479667 run-command.c:655 trace: run_command: git index-pack --stdin -v --fix-thin '--keep=fetch-pack 32724 on CXWUSOMA-LT4M0C' --pack_header=2,488
15:48:24.502161 exec-cmd.c:237 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
15:48:24.514161 git.c:460 trace: built-in: git index-pack --stdin -v --fix-thin '--keep=fetch-pack 32724 on WindowsLaptop' --pack_header=2,488
remote: Total 488 (delta 304), reused 31 (delta 22)
Receiving objects: 100% (488/488), 395.37 KiB | 1.28 MiB/s, done.
Resolving deltas: 100% (304/304), completed with 14 local objects.
15:48:24.929889 run-command.c:655 trace: run_command: git rev-list --objects --stdin --not --all --quiet --alternate-refs
15:48:24.954261 exec-cmd.c:237 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
15:48:24.966260 git.c:460 trace: built-in: git rev-list --objects --stdin --not --all --quiet --alternate-refs
From ssh://bb.company.com:7999/web/webapps
4b6d32a7b..5f5b0aca1 main -> origin/main
* [new branch] John/DEV-5219 -> origin/John/DEV-5219
…… blah blah