45mg <45mg.wri...@gmail.com> writes:

> The initial `git pull` part can be surprisingly slow, though. And it's
> not always a network thing. For example, every single time I run `guix
> pull` it appears to do nothing for like 2 minutes, and then the progress
> bars display as it pulls the entire repo instead of using a cached
> checkout, which takes forever.
>
> It's probably a bug with the caching; I pull from a local authenticated
> fork, which can't be too common, so it makes sense that this hasn't been
> caught before. I haven't had time to properly debug it yet (deleting the
> cache does not help).

Ok, small update: I decided to spend a little time trying to debug it.
It looks like it's a libgit2 issue, not a Guix issue.

Specifically, `update-cached-checkout` in (guix git) calls libgit2's
`git_remote_fetch` (via the guile-git `remote-fetch` binding). I tested
this function on the cached clone [1] and it's /extremely/ slow.

This has been reported upstream:
https://github.com/libgit2/libgit2/issues/5271

[1]
(remote-fetch (remote-lookup 
               (repository-open "~/.cache/guix/checkouts/cachename") 
               "origin")
              #:fetch-options (make-default-fetch-options
                               #:verify-certificate? #t))

Reply via email to