msys2 / msys2-pacman

A friendly fork of https://gitlab.archlinux.org/pacman/pacman
GNU General Public License v2.0
21 stars 12 forks source link

DB signature verification is slow #26

Open lazka opened 1 year ago

lazka commented 1 year ago

example: time pacman - 0.598s - this will load all databases and verify their signatures using gpgme.

Most of the time is spend in _alpm_gpgme_checksig, skipping it brings us down to 0.036s.

Things I've tried:

With that we are down to 0.474s, but this doesn't feel upstreamable.. likely the difference is less on Linux.

I'm gonna leave that as is for now.

lazka commented 1 year ago

gpgme_get_key() really has a 40% overhead due to the extra context even on Linux. I'm going to ask upstream.

edit: I've proposed a new API upstream: https://dev.gnupg.org/T6369

lazka commented 1 month ago

Since there was no upstream activity on this (code wise) I proposed another patch: https://dev.gnupg.org/T6369#186304