Hi, Ricardo Wurmus <[email protected]> skribis:
> Ludovic Courtès <[email protected]> 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’.
