Skip to content

Cloning large repo in libgit2 slower than git clone #4674

Open
@Arcterus

Description

@Arcterus

I didn't see this when I briefly checked the list of issues, so sorry if it's already been reported. Both libgit2 and git clone spend roughly the same amount of time downloading (around 30 seconds or so), but the "Resolving deltas" stage is much slower using libgit2.

Reproduction steps

I just cloned git://sourceware.org/git/glibc.git using the example code in the repository.

Expected behavior

Both libgit2 and git clone take roughly the same amount of time.

Actual behavior

libgit2 takes around 4 minutes, whereas git clone takes about 1.5 minutes.

Version of libgit2 (release number or SHA1)

0.27.0 (I've also tested whatever the Rust crate git2 downloads by default, and the speed was about the same).

Operating system(s) tested

Linux alex-linux 4.16.13-2-ARCH #1 SMP PREEMPT Fri Jun 1 18:46:11 UTC 2018 x86_64 GNU/Linux

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions