From 7420ab4866e69da6f0d52b09c6d80356b19ee128 Mon Sep 17 00:00:00 2001 From: Nikola Pajkovsky Date: Tue, 21 Oct 2025 18:49:27 +0200 Subject: [PATCH] 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) --- crypto/x509/x509_lu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- 2.47.3