From ed3b285cdcef9bd8c6c9c305016fe156abef22e2 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Mon, 8 May 2023 13:09:27 +0200 Subject: kbx: For non-Windows use 64k buffers by default instead of 128k. * kbx/keybox-init.c (DEFAULT_LL_BUFFER_SIZE): New. -- A simple gpg --check-sigs benchmark showed on Linux a small performance peak at around 64k (5m52 vs. 6m8 for 128k and 6m33 for system size). --- kbx/keybox-init.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/kbx/keybox-init.c b/kbx/keybox-init.c index 17463c983..1318e3e2e 100644 --- a/kbx/keybox-init.c +++ b/kbx/keybox-init.c @@ -28,7 +28,13 @@ #include "../common/sysutils.h" #include "../common/mischelp.h" -static unsigned int ll_buffer_size = 128; +#ifdef HAVE_W32_SYSTEM +# define DEFAULT_LL_BUFFER_SIZE 128 +#else +# define DEFAULT_LL_BUFFER_SIZE 64 +#endif + +static unsigned int ll_buffer_size = DEFAULT_LL_BUFFER_SIZE; static KB_NAME kb_names; -- cgit v1.2.3