debcrafters-packages team mailing list archive
-
debcrafters-packages team
-
Mailing list archive
-
Message #02154
[Bug 2114179] Re: libgit2 extremely slow performing network operations
** Changed in: libgit2
Status: Unknown => New
--
You received this bug notification because you are a member of
Debcrafters packages, which is subscribed to libgit2 in Ubuntu.
https://bugs.launchpad.net/bugs/2114179
Title:
libgit2 extremely slow performing network operations
Status in libgit2:
New
Status in libgit2 package in Ubuntu:
Triaged
Bug description:
libgit2 in kubuntu 25.04 is extremely slow to complete network
operations such as git_remote_fetch(), git_clone().
In kubuntu 25.04 it is taking many minutes (approx. 10) to fetch a
very small, simple 1MB repository. The exact same code, working on the
exact same repository, runs in under a second in kubuntu 24.10.
I can step through the code using gdb and observe that the function
call that takes an excessive amount of time is git_remote_fetch().
The code is a very lightly modified version of the original libgit2 example function lg2_fetch():
```
static int lg2_fetch(git_repository *repo) {
git_remote *remote = NULL;
git_fetch_options fetch_opts = GIT_FETCH_OPTIONS_INIT;
const char *remote_name = "origin";
siril_debug_print("Fetching %s for repo %p\n", remote_name,
repo);
int val;
if (git_remote_lookup(&remote, repo, remote_name)) {
if (git_remote_create_anonymous(&remote, repo, remote_name)) {
siril_log_message(_("Unable to create anonymous remote for the repository. Check your connectivity and try again.\n"));
val = 1;
goto on_error;
}
}
/* The next line takes a very long time in 25.04 whereas in 24.10 it is quick. */
val = git_remote_fetch(remote, NULL, &fetch_opts, "fetch");
return val;
}
```
The same pattern occurs if I delete the local repository and force a
code path that calls git_clone() to re-clone it from the remote.
This is not a network speed or conditions problem as I can pull the
same repository extremely quickly using the main git command-line
tool.
To manage notifications about this bug go to:
https://bugs.launchpad.net/libgit2/+bug/2114179/+subscriptions
References