]> git.koha-community.org Git - koha.git/commit
Bug 14769: (Follow-up) Reduce number of preference parses
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Fri, 9 Feb 2018 08:03:26 +0000 (09:03 +0100)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 12 Apr 2018 13:50:35 +0000 (10:50 -0300)
commit49933cd449de64f4f546c929641f86550c00812f
treec98b7fb268a75ea5816d1688ebb9c0976ed21ccb
parent420f8b01d4c5420cb6538b75c06c828f90fdaac0
Bug 14769: (Follow-up) Reduce number of preference parses

In sub merge the Koha::Authority object was already created, so it was kind
of silly to recreate it each time with new.
In Koha::Authority, the ControlledIndicators object can be saved in the
object too for reuse during its life time. Similarly, we prevent repeated
lookups for the reporting tag (via authority type).

Test plan:
[1] Run t/db_dependent/Authority/Merge.t
[2] Run t/db_dependent/Koha/Authorities.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Limited benchmarking shows me a reduction of 11% on Merge.t and a
reduction of 4% on Authorities.t when comparing with and without this
last patch. The larger impact on Merge.t could be expected.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
C4/AuthoritiesMarc.pm
Koha/Authority.pm