From: Nikola Pajkovsky Date: Tue, 21 Oct 2025 16:49:27 +0000 (+0200) Subject: x509-store: reduce number of pre-allocated hashtable buckets X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7420ab4866e69da6f0d52b09c6d80356b19ee128;p=thirdparty%2Fopenssl.git x509-store: reduce number of pre-allocated hashtable buckets pre-allocating too much hashtable objects to avoid the hashtable regrowing is mistake, and had immediate impact on memory footprint. Resolves: https://github.com/openssl/project/issues/1679 Link: https://openssl-library.org/performance/ Fixes: 04589b59ef50 ("x509store: reduce lock contention in X509_STORE") Signed-off-by: Nikola Pajkovsky Reviewed-by: Neil Horman Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/28965) --- diff --git a/crypto/x509/x509_lu.c b/crypto/x509/x509_lu.c index 46b87e1bff4..a8a80fb9488 100644 --- a/crypto/x509/x509_lu.c +++ b/crypto/x509/x509_lu.c @@ -17,7 +17,7 @@ #include #include "x509_local.h" -#define X509_OBJS_HT_BUCKETS 512 +#define X509_OBJS_HT_BUCKETS 8 X509_LOOKUP *X509_LOOKUP_new(X509_LOOKUP_METHOD *method) {