[Koha-bugs] [Bug 28278] Improve $KOHA_CONF parsing speed by using XML::LibXML

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon May 3 09:03:16 CEST 2021


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28278

--- Comment #2 from Julian Maurice <julian.maurice at biblibre.com> ---
Created attachment 120375
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120375&action=edit
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`.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list