diff options
| author | Werner Koch <[email protected]> | 2020-09-24 14:47:10 +0000 |
|---|---|---|
| committer | Werner Koch <[email protected]> | 2020-09-24 14:47:10 +0000 |
| commit | d49a945b12d98fadd0d37f4e50b5e02799e16305 (patch) | |
| tree | 5de4a3fd09782e9f8769d1ab18890ea15cfff30c /g10/import.c | |
| parent | keyboxd: New command TRANSACTION. (diff) | |
| download | gnupg-d49a945b12d98fadd0d37f4e50b5e02799e16305.tar.gz gnupg-d49a945b12d98fadd0d37f4e50b5e02799e16305.zip | |
gpg: New experimental import option "bulk-import"
* g10/options.h (IMPORT_BULK): New.
* g10/import.c (parse_import_options): Add "bulk-import".
* g10/call-keyboxd.c (in_transaction): New var.
(gpg_keyboxd_deinit_session_data): Run a commit if in bulk import
mode.
(create_new_context): Run a begin transaction if in bulk import mode.
--
Initial tests with this option are not very promising. Importing
about 3000 real world keys with --use-keyboxd and full logging took:
real 33m31.724s
user 19m54.265s
sys 2m49.662s
With bulk-import this saves a mere 12%:
real 29m36.542s
user 19m3.391s
sys 2m46.728s
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'g10/import.c')
| -rw-r--r-- | g10/import.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/g10/import.c b/g10/import.c index 4ff334cc7..80388835e 100644 --- a/g10/import.c +++ b/g10/import.c @@ -178,9 +178,15 @@ parse_import_options(char *str,unsigned int *options,int noisy) {"fast-import",IMPORT_FAST,NULL, N_("do not update the trustdb after import")}, + {"bulk-import",IMPORT_BULK, NULL, + N_("enable bulk import mode")}, + {"import-show",IMPORT_SHOW,NULL, N_("show key during import")}, + {"show-only", (IMPORT_SHOW | IMPORT_DRY_RUN), NULL, + N_("show key but do not actually import") }, + {"merge-only",IMPORT_MERGE_ONLY,NULL, N_("only accept updates to existing keys")}, @@ -206,10 +212,6 @@ parse_import_options(char *str,unsigned int *options,int noisy) {"repair-keys", IMPORT_REPAIR_KEYS, NULL, N_("repair keys on import")}, - /* No description to avoid string change: Fixme for 2.3 */ - {"show-only", (IMPORT_SHOW | IMPORT_DRY_RUN), NULL, - NULL}, - /* Hidden options which are enabled by default and are provided * in case of problems with the respective implementation. */ {"collapse-uids", IMPORT_COLLAPSE_UIDS, NULL, NULL}, |
