1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-06-15 00:29:49 +02:00
gnupg/kbx
Werner Koch 08ff55bd44
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.
--

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-08 09:40:14 +02:00
..
backend-cache.c keyboxd: Extend PUBKEY_INFO status line with an uid ordinal. 2020-09-22 15:42:40 +02:00
backend-kbx.c kbx: Avoid use of uninitialized value. 2021-11-12 15:36:35 +09:00
backend-sqlite.c keyboxd: Fix searching for exact mail addresses. 2021-04-21 14:40:08 +02:00
backend-support.c keyboxd: Allow import of v0 certificates. 2023-03-08 16:09:56 +01:00
backend.h kbx: Let it include keybox.h to avoid multiple typedefs. 2021-09-30 10:14:37 +09:00
ChangeLog-2011 Generate the ChangeLog from commit logs. 2011-12-01 11:09:02 +01:00
frontend.c kbx: Improve debugging of the search descriptions in keyboxd. 2021-07-08 13:57:13 +02:00
frontend.h keyboxd: New command TRANSACTION. 2020-09-24 16:38:21 +02:00
kbx-client-util.c kbx: Avoid uninitialized read 2021-05-20 14:45:29 +02:00
kbx-client-util.h keyboxd: Implement multiple search descriptions. 2020-09-24 10:37:42 +02:00
kbxserver.c kbx: Fix a race condition which results no status report. 2022-04-27 13:49:30 +09:00
kbxutil.c kbx: Fix for GPG_ERR_SOURCE_DEFAULT. 2022-09-14 16:53:35 +09:00
keybox-blob.c kbx: A 20 byte fingerprint is right filled in version 2 blob. 2021-09-28 17:12:26 +09:00
keybox-defs.h kbx: Use wrapper functions for es_fclose and es_fopen. 2023-05-05 11:54:37 +02:00
keybox-dump.c kbx: Avoid uninitialized read 2021-05-20 14:45:29 +02:00
keybox-errors.c all: fix spelling and typos 2018-10-24 15:56:18 -04:00
keybox-file.c Replace most of the remaining stdio calls by estream calls. 2020-10-20 12:15:56 +02:00
keybox-init.c kbx: Use custom estream buffering 2023-05-08 09:40:14 +02:00
keybox-openpgp.c kbx: Better error message in case of a crippled Libgcrypt. 2020-12-02 11:14:19 +01:00
keybox-search-desc.h kbx: Fix keyboxd searching with multiple patterns. 2021-07-08 13:57:13 +02:00
keybox-search.c kbx: Use wrapper functions for es_fclose and es_fopen. 2023-05-05 11:54:37 +02:00
keybox-update.c kbx: Use wrapper functions for es_fclose and es_fopen. 2023-05-05 11:54:37 +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-08 09:40:14 +02:00
keyboxd-w32info.rc kbx: Add framework for a public key daemon. 2018-09-05 17:00:17 +02:00
keyboxd.c Remove remaining support for WindowsCE 2022-06-03 10:08:21 +02:00
keyboxd.h kbx: Fix a race condition which results no status report. 2022-04-27 13:49:30 +09:00
Makefile.am build: Remove Windows CE support. 2022-12-09 14:06:08 +09:00
Manifest The keybox gets now compressed after 3 hours and ephemeral 2004-04-26 08:09:25 +00:00
mkerrors all: fix more spelling errors 2018-10-25 16:53:05 -04:00