Bug 28278: Improve $KOHA_CONF parsing speed by using XML::LibXML
- Without the patch:
$ hyperfine --warmup 1 \
'perl -MKoha::Config -e "Koha::Config->read_from_file(\$ENV{KOHA_CONF}) for (1..1000)"'
Time (mean ± σ): 3.585 s ± 0.018 s [User: 3.531 s, System: 0.049 s]
Range (min … max): 3.547 s … 3.612 s 10 runs
- With the patch:
$ hyperfine --warmup 1 \
'perl -MKoha::Config -e "Koha::Config->read_from_file(\$ENV{KOHA_CONF}) for (1..1000)"'
Time (mean ± σ): 1.122 s ± 0.028 s [User: 1.104 s, System: 0.014 s]
Range (min … max): 1.095 s … 1.189 s 10 runs
Test plan:
1. Apply the first patch (the one with the unit tests) and make sure
tests pass: `prove t/Koha/Config.t`
2. Apply the rest of the patches and verify that tests still pass:
`prove t/Koha/Config.t`.
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>