From: "Ludovic Courtès" <ludo@gnu.org>
To: Ricardo Wurmus <rekado@elephly.net>
Cc: guix-devel@gnu.org
Subject: Re: Updating the “pre-push” Git hook
Date: Tue, 26 May 2020 00:04:20 +0200 [thread overview]
Message-ID: <87tv03r7rv.fsf@gnu.org> (raw)
In-Reply-To: <87eer8jqd0.fsf@elephly.net> (Ricardo Wurmus's message of "Mon, 25 May 2020 11:50:03 +0200")
Hi,
Ricardo Wurmus <rekado@elephly.net> skribis:
> Ludovic Courtès <ludo@gnu.org> 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 ‘keyring’ branch, and the other half is traversing
the commit graph:
--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guile --no-auto-compile -e git-authenticate ./build-aux/git-authenticate.scm d68de958b60426798ed62797ff7c96c327a672ac $(git rev-parse HEAD)
Authenticating d68de95 to a1a3bd5 (0 commits)...
% cumulative self
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-reporter
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’s
nothing to do, and by storing keys in binary format instead of
ASCII-armored, if needed.
Thanks,
Ludo’.
next prev parent reply other threads:[~2020-05-25 22:04 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-22 20:44 Updating the “pre-push” Git hook Ludovic Courtès
2020-05-22 21:17 ` Leo Famulari
2020-05-24 7:27 ` Ricardo Wurmus
2020-05-24 21:44 ` Ludovic Courtès
2020-05-25 9:50 ` Ricardo Wurmus
2020-05-25 22:04 ` Ludovic Courtès [this message]
2020-05-24 6:41 ` Efraim Flashner
2020-05-24 21:45 ` Ludovic Courtès
2020-05-25 5:50 ` Efraim Flashner
2020-05-25 21:31 ` Ludovic Courtès
2020-05-25 20:13 ` Vagrant Cascadian
2020-05-25 21:37 ` Ludovic Courtès
2020-05-26 16:41 ` Leo Famulari
2020-05-29 16:45 ` Heads-up: “pre-push” Git hook updated Ludovic Courtès
2020-05-29 17:07 ` Pierre Neidhardt
2020-05-29 18:39 ` Christopher Baines
2020-06-04 11:50 ` Ludovic Courtès
2020-06-04 18:33 ` Christopher Baines
2020-06-08 18:41 ` Vagrant Cascadian
2020-06-09 15:46 ` 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=87tv03r7rv.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guix-devel@gnu.org \
--cc=rekado@elephly.net \
/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).