unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Philip McGrath" <philip@philipmcgrath.com>
To: "Brian Cully" <guix-devel@gnu.org>
Subject: Re: RFC: libgit2 is slow/inefficient; switch to git command?
Date: Tue, 22 Nov 2022 11:49:26 -0500	[thread overview]
Message-ID: <49015314-2158-466b-a8ac-41abed84c5f1@app.fastmail.com> (raw)
In-Reply-To: <86leo3c81x.fsf@gmail.com>

Hi,

On Tue, Nov 22, 2022, at 10:39 AM, zimoun wrote:
> Hi,
>
> On Mon, 21 Nov 2022 at 21:21, Maxim Cournoyer <maxim.cournoyer@gmail.com> wrote:
>
>> Given that:
>>
>> * the git CLI doesn't suffer from such poor performance;
>> * This kind of performance problem has been known for years in libgit2
>>   [0] with no fix in sight;
>> * other projects such as Cargo support using the git CLI and that
>>   projects are using it for that reason [1];
>
> And I would add the lack of «Support for shallow repositories» [1].
>
> 1: <https://github.com/libgit2/libgit2/issues/3058>
>

>
> PS: For the record, Software Heritage, which ingests *a lot* of Git
> repositories, relies on Dulwhich [2] (pure Python implementation), IIUC.
>
> 2: <https://www.dulwich.io/>

Along those lines, there’s an implementation of clone/checkout in pure Racket (for the package manager) that could probably be ported to Guile relatively easily. I’d expect libgit2 to be faster for the things that it supports, but the Racket implementation does support shallow checkout, so it might pay off if that skips a lot of work.

Code: https://github.com/racket/racket/blob/master/racket/collects/net/git-checkout.rkt
Docs: https://docs.racket-lang.org/net/git-checkout.html

(More broadly, I haven’t investigated performance issues, but my basic inclination would be toward improving libgit2 over running the git executable.)

-Philip


  reply	other threads:[~2022-11-22 16:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-22  2:21 RFC: libgit2 is slow/inefficient; switch to git command? Maxim Cournoyer
2022-11-22 15:39 ` zimoun
2022-11-22 16:49   ` Philip McGrath [this message]
2022-11-22 17:51     ` Wojtek Kosior via Development of GNU Guix and the GNU System distribution.
2022-11-22 21:15       ` Phil
2022-11-23  9:57         ` zimoun
2022-11-23 22:04         ` Ludovic Courtès
2022-11-23 22:16 ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49015314-2158-466b-a8ac-41abed84c5f1@app.fastmail.com \
    --to=philip@philipmcgrath.com \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).