]> git.koha-community.org Git - koha.git/commit
Bug 37657: Make koha-preferences CLI tool faster
authorDavid Cook <dcook@prosentient.com.au>
Tue, 20 Aug 2024 04:13:38 +0000 (04:13 +0000)
committerKatrin Fischer <katrin.fischer@bsz-bw.de>
Tue, 27 Aug 2024 10:14:22 +0000 (12:14 +0200)
commit673aaaaba293f08f6c5784ab5beb4f51e45855fb
treeaf71816fd02ad49eb7e412194987a76e3dd7d6e6
parentd95fffb8eca6cbf94ab758b762c4dfd5a868090f
Bug 37657: Make koha-preferences CLI tool faster

By using Koha::Database->dbh() to use a minimal database handle
which doesn't preload the whole DBIx::Class schema, we're able to
run the same command 2-3 times faster.

This is beneficial when running the tool in a loop which runs the
command serially one by one.

Test plan:

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

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
misc/admin/koha-preferences