RPM Community Forums

Mailing List Message of <rpm-users>

Re: rpm -qa performance with GPG key(s) installed in the DB

From: Jeff Johnson <n3npq@mac.com>
Date: Fri 04 Dec 2009 - 23:07:39 CET
Message-id: <609AB5D1-A546-45A9-B8F5-EF9DECE65C5F@mac.com>

On Dec 4, 2009, at 4:50 PM, Joshua Burns wrote:

> Hi Jeff, thanks for the information. 
> 
> openssl is significantly faster and should make performance a non-issue. 
> 
> I noticed in earlier posts that you were contemplating or had planned on creating a macro for --usecrypto - does a macro for this option exist currently in 5.1.9? 
> 
> 73 de Josh
> 

;-)

Odd, the performance measurements I see on linux/x86 are
	beecrypt < nss < openssl
using callgrind.

You mean a macro to select what crypto implementation to use persistently?

It wouldn't be too hard to add a macro. About all that is hard is
figgering a place to expand the macro and set the default
when rpmlib is initialized through bindings. That's likely
why I dinna bother with a macro ...

Here's the current build time crypto assignment (rpmio/rpmpgp.c):

/*@unchecked@*/
pgpImplVecs_t * pgpImplVecs =
    /* explicit selection (order DOES NOT matter here) */
#if defined(USE_CRYPTO_BEECRYPT) && defined(WITH_BEECRYPT)
        &rpmbcImplVecs;
#elif defined(USE_CRYPTO_GCRYPT) && defined(WITH_GCRYPT)
        &rpmgcImplVecs;
#elif defined(USE_CRYPTO_NSS) && defined(WITH_NSS)
        &rpmnssImplVecs;
#elif defined(USE_CRYPTO_OPENSSL) && defined(WITH_SSL)
        &rpmsslImplVecs;
    /* implict selection (order DOES matter) */
#elif defined(WITH_BEECRYPT)
        &rpmbcImplVecs;
#elif defined(WITH_GCRYPT)
        &rpmgcImplVecs;
#elif defined(WITH_NSS)
        &rpmnssImplVecs;
#elif defined(WITH_SSL)
        &rpmsslImplVecs;
#else
#error INTERNAL ERROR: no suitable Cryptography library available
#endif

OTOH, does anyone but a nerd really care what crypto implementation is used? ;-)

BTW, "rpm -qa" is slowly getting faster and faster on HEAD ... no crypto needed.

73 de Jeff
Received on Fri Dec 4 23:07:58 2009
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.