Koha/misc
David Cook 5321e0fb09
Bug 37682: Lazy-load modules for setters in koha-preferences tool
This change lazy-loads modules for setters in the
koha-preferences tool, so that getters are free to run super fast.

Between BZ 37657 and BZ 37682 we effectively eliminate the
overhead of running "get" or "dump" commands via the koha-preferences
tool.

Test plan:

1. time misc/admin/koha-preferences get SearchEngine
2. Note time is about .35 seconds
3. time misc/admin/koha-preferences dump
4. Note time is about .35 seconds
5. Create sysprefs.yml

   ---
   marcflavour: MARC21
   viewMARC: 1

6. time misc/admin/koha-preferences load -i sysprefs.yml
7. Note time is about .35 seconds
8. time misc/admin/koha-preferences set SearchEngine Elasticsearch
9. Note time is about 1 seconds

10. Apply patch
11. Repeat the koha-preferences commands above
12. Note that the "dump" and "get" commands run in about .09-.1
seconds. The "load" and "set" commands still take the same amount
of time as their behaviours haven't changed

13. misc/admin/koha-preferences set SearchEngine Elasticsearch1
14. koha-mysql kohadev
15. select * from action_logs where module = 'SYSTEMPREFERENCE'
 order by action_id desc limit 5;
16. Note that the action log showing Elasticsearch1 update says
    "interface"
 of "commandline" and "script" of "koha-preferences"

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-08-27 12:14:23 +02:00
..
admin Bug 37682: Lazy-load modules for setters in koha-preferences tool 2024-08-27 12:14:23 +02:00
bin Bug 37543: (follow-up) Tidy 2024-08-16 17:33:43 +02:00
cronjobs Bug 37552: Wrap auto renewal attempt in eval to ensure script does not die 2024-08-16 17:33:49 +02:00
devel
interface_customization
maintenance Bug 37181: Add --confirm option to pseudonymize_statistics.pl 2024-06-27 14:04:54 +02:00
migration_tools Bug 37553: Tidy to make QA tools happy 2024-08-02 18:59:59 +02:00
release_notes 24.05.00: Add release notes 2024-05-27 18:26:45 +02:00
search_tools
translator Bug 37303: Replace po2json with a JS version 2024-07-26 14:49:53 +01:00
workers Bug 36901: Add logging for uncaught exceptions in background job classes 2024-07-01 18:55:54 +02:00
add_date_fields_to_marc_records.pl
add_statistics_borrowers_categorycode.pl
batchCompareMARCvsFrameworks.pl
batchdeletebiblios.pl
batchDeleteUnusedSubfields.pl
batchImportMARCWithBiblionumbers.pl
batchRebuildBiblioTables.pl
batchRebuildItemsTables.pl
batchRepairMissingBiblionumbers.pl
check_sysprefs.pl
commit_file.pl
export_borrowers.pl
export_records.pl Bug 36770: (QA follow-up) Tidy export_records.pl 2024-08-09 18:44:54 +02:00
exportauth.pl
import_patrons.pl
koha-install-log
link_bibs_to_authorities.pl
load_yaml.pl
mod_zebraqueue.pl
process_ill_updates.pl
recreateIssueStatistics.pl
sax_parser_print.pl
sax_parser_test.pl
sip_cli_emulator.pl
stage_file.pl
z3950_responder.pl