diff options
author | Werner Koch <wk@gnupg.org> | 2023-05-08 13:09:27 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2023-05-08 13:09:27 +0200 |
commit | a2c199affb8e92ce1e0206757130e2fb72cc0cfd (patch) | |
tree | d449219c982e4d13be2b023464a8aac49fe3fadf | |
parent | kbx: Use custom estream buffering (diff) | |
download | gnupg2-a2c199affb8e92ce1e0206757130e2fb72cc0cfd.tar.xz gnupg2-a2c199affb8e92ce1e0206757130e2fb72cc0cfd.zip |
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).
-rw-r--r-- | kbx/keybox-init.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/kbx/keybox-init.c b/kbx/keybox-init.c index c83c4712f..439d1c477 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; |