Subject: Re: bug#65720: Guile-Git-managed checkouts grow way too much

From: Simon Tournier <[email-masked]>
Date: Tue, 19 Sep 2023 09:19:44 +0200

Hi Ludo.

On Tue, 19 Sep 2023 at 00:35, Ludovic Courtès <[email-masked]> wrote:

> --8<---------------cut here---------------start------------->8---
> scheme@(guile-user)> ,use(git)
> scheme@(guile-user)> ,t (clone "https://git.savannah.gnu.org/git/guix.git" "/tmp/guix")
> $5 = #<git-repository 91a7b0>
> ;; 600.534529s real time, 435.260926s run time.  0.000000s spent in GC.
> scheme@(guile-user)> ,t (clone "https://git.savannah.gnu.org/git/guix.git" "/tmp/guix-after-removing-nix-branch")
> $6 = #<git-repository 4465a50>
> ;; 420.321511s real time, 398.772963s run time.  0.000000s spent in GC.
> --8<---------------cut here---------------end--------------->8---

[...]

> --8<---------------cut here---------------start------------->8---
> $ du -hs /tmp/guix/.git
> 373M	/tmp/guix/.git
> $ du -hs /tmp/guix-after-removing-nix-branch/.git
> 362M	/tmp/guix-after-removing-nix-branch/.git
> --8<---------------cut here---------------end--------------->8---

Just to also point [1] that using shallow clone and restrict to the
oldest reachable commit by the time-machine, it saves 25% of bits to
download, and similarly on disk.

--8<---------------cut here---------------start------------->8---
scheme@(guix-user)> ,t (clone "https://git.savannah.gnu.org/git/guix.git" "/tmp/guix-guile")
$1 = #<git-repository df3710>
;; 383.186818s real time, 278.060733s run time.  0.000000s spent in GC.

$ time git clone https://git.savannah.gnu.org/git/guix.git guix-full
Receiving objects: 100% (693699/693699), 342.14 MiB | 2.87 MiB/s, done.
real    2m40,830s
user    3m4,683s
sys     0m8,189s

$ time git clone --shallow-since=2019-04-30 https://git.savannah.gnu.org/git/guix.git guix-oldest
Receiving objects: 100% (428646/428646), 259.41 MiB | 3.87 MiB/s, done.
real    1m45,604s
user    2m32,370s
sys     0m5,916s

$ du -sh guix-*/.git
362M    guix-full/.git
362M    guix-guile/.git
272M    guix-oldest/.git
--8<---------------cut here---------------end--------------->8---

Cheers,
simon

1: Re: hard dependency on Git? (was bug#65866: [PATCH 0/8] Add built-in builder for Git checkouts)
Simon Tournier <[email-masked]>
Mon, 11 Sep 2023 19:52:34 +0200
id:[email-masked]
https://lists.gnu.org/archive/html/guix-devel/2023-09
https://yhetil.org/guix/[email-masked]