Git pull took over an hour

Since the last few versions (I am currently at 1.21.11) I’ve noticed that a git pull has been very slow for some larger repositories. Just moments ago I confirmed that it took over an hour. I set the timeout for web server to something insane, then proceeded to do the pull.

I walked away from my computer and came back an hour later, it was still sitting there, but I could see server side that it was still packing up the objects.

Some time afterwards I see client side that it’s begun to receive the objects

git pull
remote: Enumerating objects: 6000071, done.
remote: Counting objects: 100% (6000043/6000043), done.
remote: Compressing objects: 100% (2391159/2391159), done.
remote: Total 5943549 (delta 3621589), reused 5817059 (delta 3501925), pack-reused 0 (from 0)
Receiving objects: 100% (5943549/5943549), 1.02 GiB | 1.30 MiB/s, done.
Resolving deltas: 100% (3621589/3621589), completed with 24362 local objects.

It’s a huge repository (a fork of ports - FreeBSD ports tree), and it’s had it’s issues with Gitea in the past, but Gitea addressed those problems before. Now it’s seems it’s regressing back to poor performance, at least when it comes to the Git CLI. The web interface continues to be very fast.

Server side it’s NVME’s on 64-bit Xeon CPU’s. Not the fastest server, but it has been able to handle it before.

Maybe there is something I need to do to keep the larger repo’s performing well? Or is this perhaps a regression with Gitea?

A few things,

  1. can you confirm the timing using SSH, this will narrow down if its specific to HTTP clones
  2. can you go into the bare repo store on disk and garbage-collect, health-check, and pack the repo? this will optimize the repo for clones/pulls, git itself should do this periodically, but sometimes it doesn’t.
  3. when pulling do you see any CPU spikes on your client/server?
  4. is this just the case for pulls, or clones as well?