From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id MPYKGvJAzF6DPgAA0tVLHw (envelope-from ) for ; Mon, 25 May 2020 22:04:34 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id UBACFvJAzF6FQQAA1q6Kng (envelope-from ) for ; Mon, 25 May 2020 22:04:34 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 215BA940D3B for ; Mon, 25 May 2020 22:04:34 +0000 (UTC) Received: from localhost ([::1]:42226 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdLCz-0004DI-2l for larch@yhetil.org; Mon, 25 May 2020 18:04:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39142) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdLCp-0004Cv-I7 for guix-devel@gnu.org; Mon, 25 May 2020 18:04:23 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:58510) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdLCp-0005yl-0c; Mon, 25 May 2020 18:04:23 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=52430 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jdLCo-00008i-IL; Mon, 25 May 2020 18:04:22 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Ricardo Wurmus Subject: Re: Updating the =?utf-8?B?4oCccHJlLXB1c2jigJ0=?= Git hook References: <87imgn8zsv.fsf@gnu.org> <20200522211710.GA5603@jasmine.lan> <877dx1dc8p.fsf@elephly.net> <87d06txb2i.fsf@gnu.org> <87eer8jqd0.fsf@elephly.net> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 7 Prairial an 228 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Tue, 26 May 2020 00:04:20 +0200 In-Reply-To: <87eer8jqd0.fsf@elephly.net> (Ricardo Wurmus's message of "Mon, 25 May 2020 11:50:03 +0200") Message-ID: <87tv03r7rv.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel@gnu.org Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Spam-Score: -1.01 X-TUID: dRUSOxRjlCqM Hi, Ricardo Wurmus skribis: > Ludovic Court=C3=A8s writes: > >> Could you try: >> >> mv ~/.cache/guix/authentication/channels/guix{,.bak} >> time make authenticate >> mv ~/.cache/guix/authentication/channels/guix{.bak,} >> >> ? > > real 0m49.496s > user 0m43.733s > sys 0m1.658s Same timing if you run: make guix/{git,openpgp}.go beforehand? I get 29s for 16865 commits. > And then running it again: > > $ [env] time make authenticate > Authenticating Git checkout... > Authenticating d68de95 to fb1675e (0 commits)... > > real 0m2.692s > user 0m2.877s > sys 0m0.128s Oh I see that too. Roughly half of the time seems to be spent loading the keyring from the =E2=80=98keyring=E2=80=99 branch, and the other half i= s traversing the commit graph: --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guile --no-auto-compile -e git-authenticate ./build-aux/g= it-authenticate.scm d68de958b60426798ed62797ff7c96c327a672ac $(git rev-pars= e HEAD) Authenticating d68de95 to a1a3bd5 (0 commits)... % cumulative self=20=20=20=20=20=20=20=20=20=20=20=20=20 time seconds seconds procedure 37.04 0.73 0.73 anon #x4a44d0 12.96 0.25 0.25 anon #x49e788 11.11 0.22 0.22 guix/openpgp.scm:1030:0:crc24 6.48 0.16 0.13 anon #x4a2810 4.63 0.09 0.09 ice-9/popen.scm:145:0:reap-pipes 3.70 0.07 0.07 ice-9/vlist.scm:539:0:vhash-assq 3.70 0.07 0.07 anon #x497578 2.78 0.05 0.05 anon #x4a52c0 2.78 0.05 0.05 anon #x4a27e0 2.78 0.05 0.05 anon #x49d9e0 1.85 0.05 0.04 anon #x4a5494 1.85 0.05 0.04 anon #x497190 0.93 0.62 0.02 guix/openpgp.scm:1056:0:read-radix-64 0.93 0.33 0.02 gcrypt/base64.scm:154:2:base64-decode 0.93 0.04 0.02 anon #x4a2878 0.93 0.02 0.02 anon #x4a2840 0.93 0.02 0.02 anon #x49f928 0.93 0.02 0.02 git/commit.scm:213:0:commit-parents 0.93 0.02 0.02 anon #x4a1ab8 0.93 0.02 0.02 anon #x4975a8 0.93 0.02 0.02 anon #x5f6210 0.00 1.96 0.00 /home/ludo/src/guix/build-aux/git-authenticate.= scm:430:3 0.00 1.15 0.00 guix/git.scm:387:0:commit-closure 0.00 1.15 0.00 guix/git.scm:401:0:commit-difference 0.00 1.05 0.00 srfi/srfi-1.scm:530:0:unfold 0.00 0.96 0.00 git/commit.scm:198:4 0.00 0.82 0.00 srfi/srfi-1.scm:452:2:fold 0.00 0.82 0.00 /home/ludo/src/guix/build-aux/git-authenticate.= scm:356:0:authenticate-commits 0.00 0.82 0.00 guix/progress.scm:65:0:call-with-progress-repor= ter 0.00 0.73 0.00 git/commit.scm:197:14 0.00 0.62 0.00 /home/ludo/src/guix/build-aux/git-authenticate.= scm:346:10 0.00 0.20 0.00 guix/openpgp.scm:987:0:get-openpgp-keyring 0.00 0.15 0.00 guix/openpgp.scm:610:0:get-signature 0.00 0.11 0.00 ice-9/format.scm:39:0:format 0.00 0.09 0.00 anon #x495690 0.00 0.09 0.00 anon #x497d54 0.00 0.09 0.00 git/types.scm:83:0 0.00 0.07 0.00 guix/openpgp.scm:614:2:get-sig 0.00 0.07 0.00 gcrypt/pk-crypto.scm:103:4 0.00 0.05 0.00 ice-9/rdelim.scm:193:0:read-line 0.00 0.05 0.00 guix/openpgp.scm:845:0:get-public-key 0.00 0.05 0.00 ice-9/format.scm:759:2:format:out-obj-padded 0.00 0.05 0.00 ice-9/format.scm:113:2:format:format-work 0.00 0.04 0.00 guix/sets.scm:84:0:set-insert 0.00 0.02 0.00 git/types.scm:106:0:make-double-pointer 0.00 0.02 0.00 ice-9/ports.scm:545:0:call-with-output-string --- Sample count: 108 Total time: 1.963880152 seconds (0.382282758 seconds in GC) --8<---------------cut here---------------end--------------->8--- We can make that a bit faster by not loading the keyring when there=E2=80= =99s nothing to do, and by storing keys in binary format instead of ASCII-armored, if needed. Thanks, Ludo=E2=80=99.