Page MenuHome GnuPG

Listing a keybox isn't as fast as promised
Closed, ResolvedPublic

Description

It would be great if --list-keys was as fast as kbxutil ;-) Using fresh
/tmp/gnupg{1,2} from
http://lists.gnupg.org/pipermail/gnupg-devel/2015-February/029541.html:

    $ time gpg2 --homedir /tmp/gnupg2 --list-keys >/dev/null
    0:04.98 (4.84 user, 0.12 sys)  14360k maxres
    $ time gpg2 --homedir /tmp/gnupg1 --list-keys >/dev/null
    0:07.24 (7.14 user, 0.08 sys)  9580k maxres
    $ time gpg2 --options /tmp/gnupg2/gpg.conf --list-keys >/dev/null
    0:09.06 (8.94 user, 0.10 sys)  14264k maxres
    $ time kbxutil /tmp/gnupg2/pubring.kbx >/dev/null
    0:00.66 (0.60 user, 0.05 sys)  4888k maxres

With trust calculation disabled, what justifies the overhead in --list-keys?
Also, it's particulary odd that key listing is twice as slow in my own homedir.

Event Timeline

guilhem set External Link to http://lists.gnupg.org/pipermail/gnupg-devel/2015-February/029541.html.Apr 1 2015, 4:19 PM
guilhem added projects: Feature Request, gnupg.
guilhem set Version to 2.1.2.
guilhem added a subscriber: guilhem.

I know. It is a regression. I will look into it soon.

werner raised the priority of this task from Wishlist to Normal.Apr 4 2015, 11:08 AM
werner added a project: Bug Report.
werner removed a project: Feature Request.

Just to be clear (it isn't clear to me that these issues are the same),
issue1938 is related to --list-sigs being extremely slow and spending all its
time in kernel mode, while in T1939 I merely wish that doing a keyring dump
with --list-keys was as fast as using kbxutils.

werner claimed this task.
werner removed a project: In Progress.

kbxutil merely dumps the meta data stored in the file and does no parsing at
all. It will never be possible to achieve the same speed: The meta data is only
used to quickly search for certain attributes but not to list them in an
appropriate way. I will thus close this issue.