From 596ede63a807da564e4ae203c7c52df06166bc37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Tue, 16 Jun 2026 10:53:03 +0200 Subject: gnu: libgit2: Use the SHA1 implementation of OpenSSL. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This leads to a 50% speedup on CPU time on a Skylake x86_64 CPU (20–25% on wall-clock time, from 15m to 11m) on a full clone of the Guix repository. * gnu/packages/version-control.scm (libgit2-1.9)[arguments]: Add “-DUSE_SHA1=HTTPS”. Signed-off-by: Ludovic Courtès Merges: #9332 --- gnu/packages/version-control.scm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index 03d6d74144b..cd33ccf42a3 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -1396,6 +1396,12 @@ other git-like projects such as @code{libgit2}.") "-DREGEX_BACKEND=pcre2" "-DUSE_HTTP_PARSER=http-parser" "-DUSE_SSH=ON" ; cmake fails to find libssh if this is missing + + ;; Use the SHA1 implementation from OpenSSL rather than the + ;; builtin one. This halves the CPU time spent in the + ;; "indexing objects" phase when cloning the Guix repo. + "-DUSE_SHA1=HTTPS" + ;; See https://github.com/libgit2/libgit2/issues/7169 #$@(if (target-32bit?) '("-DCMAKE_C_FLAGS=-D_FILE_OFFSET_BITS=64") -- cgit v1.2.3