1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00
Werner Koch ce0580a599
gpgsm: Use a cache to speed up parent certificate lookup.
* sm/gpgsm.h (COMPAT_NO_CHAIN_CACHE): New.
(struct cert_cache_item_s, cert_cache_item_t): New.
(struct server_control_s): Add parent_cert_cache.
* sm/gpgsm.c (compatibility_flags): Add "no-chain-cache".
(parent_cache_stats): New.
(gpgsm_exit): Print the stats with --debug=memstat.
(gpgsm_deinit_default_ctrl): Release the cache.
* sm/certchain.c (gpgsm_walk_cert_chain): Cache the certificates.
(do_validate_chain): Ditto.
--

This gives another boost of 30% (from 6.5 to 4.0 seconds in the test
environment with ~1000 certs).  do_validate_chain actually brings us
the speedup becuase the gpgsm_walk_cert_chain is not used during a key
listing.  For the latter we actually cache all certificates because
that was easier.

GnuPG-bug-id: 7308
2024-09-30 18:22:25 +02:00
..
2024-05-31 12:28:32 +02:00
2023-03-16 09:46:05 +01:00
2023-08-31 12:30:26 +02:00
2024-05-31 12:28:32 +02:00
2024-05-31 12:28:32 +02:00
2024-01-26 09:41:00 +01:00
2024-05-31 12:28:32 +02:00
2024-05-31 12:28:32 +02:00
2023-11-07 20:38:27 +01:00
2023-12-22 13:45:02 +01:00
2024-09-11 14:30:40 +02:00