1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-07-04 03:08:57 +02:00
gnupg/kbx
Werner Koch 69b0fa55f6
kbx: Use custom estream buffering
* kbx/keybox-init.c (ll_buffer_size): New var intialized to 128k
(stream_buffers): New var.
(keybox_set_buffersize): New.
(_keybox_ll_open, _keybox_ll_close): Implement buffering.

* sm/gpgsm.c (oKbxBufferSize): New.
(opts): Add option --kbx-buffer-size.
(main): Call keybox_set_buffersize.

* g10/gpg.c: Include keybox.h.
* (oKbxBufferSize): New.
(opts): Add option --kbx-buffer-size.
(main): Call keybox_set_buffersize.
--

Commit message from 2.4:

Running a test on Windows using a pubring.kbx with
Total number of blobs:     2098
              openpgp:     1294
                 x509:      803
and a size of 42MiB with

gpgsm -k --with-validation --disable-dirmngr --kbx-buffer-size N >nul

gives these performance figures using procmon

| N(k) | file events | time(s) |
|------+-------------+---------|
|    0 |     4900000 |      86 |
|   16 |     2456000 |      58 |
|   32 |     1233000 |      43 |
|   64 |      622000 |      37 |
|  128 |      317000 |      32 |
|  256 |      164000 |      31 |
|  512 |       88000 |      30 |

Using _open instead of CreateFile give the same number of file events
but increased the time slight by one second for the measured buffer
size of 64k and 128k.   Benchmarks for gpg have not been conducted.
2023-05-10 10:07:32 +02:00
..
ChangeLog-2011 Generate the ChangeLog from commit logs. 2011-12-01 11:09:02 +01:00
kbxutil.c Backport of the new option parser from 2.3 2020-12-04 12:12:20 +01:00
keybox-blob.c spelling: Fix "synchronize" 2019-06-23 20:17:47 -04:00
keybox-defs.h kbx: Use wrapper functions for es_fclose and es_fopen. 2023-05-10 10:05:34 +02:00
keybox-dump.c Replace most of the remaining stdio calls by estream calls. 2020-10-21 21:09:38 +02:00
keybox-errors.c Nuked almost all trailing white space. 2011-02-04 12:57:53 +01:00
keybox-file.c Replace most of the remaining stdio calls by estream calls. 2020-10-21 21:09:38 +02:00
keybox-init.c kbx: Use custom estream buffering 2023-05-10 10:07:32 +02:00
keybox-openpgp.c kbx: Better error message in case of a crippled Libgcrypt. 2020-12-02 11:11:47 +01:00
keybox-search-desc.h Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
keybox-search.c kbx: Use wrapper functions for es_fclose and es_fopen. 2023-05-10 10:05:34 +02:00
keybox-update.c kbx: Use wrapper functions for es_fclose and es_fopen. 2023-05-10 10:05:34 +02:00
keybox-util.c kbx: Simplify by removing custom memory functions. 2017-12-22 12:55:46 +01:00
keybox.h kbx: Use custom estream buffering 2023-05-10 10:07:32 +02:00
Makefile.am build: Fix several "include file not found" problems 2021-11-14 18:18:41 +01:00
Manifest The keybox gets now compressed after 3 hours and ephemeral 2004-04-26 08:09:25 +00:00
mkerrors Nuked almost all trailing white space. 2011-02-04 12:57:53 +01:00