Bug 21015: fix performance issue with C4::Members
authorJoonas Kylmälä <joonas.kylmala@iki.fi>
Fri, 29 Jun 2018 08:09:41 +0000 (11:09 +0300)
committerFridolin Somers <fridolin.somers@biblibre.com>
Wed, 28 Nov 2018 14:37:16 +0000 (15:37 +0100)
commitf504fbfcbc4ffedb9d05f1326d53618675e93b4e
tree582616183f131f9da7ba783287c5ea39989ed691
parentaac9f41bc316e891bcef59ae14cad8da85cd2c08
Bug 21015: fix performance issue with C4::Members

loading Koha::Schema ("use Koha::Schema;") takes significantly time as
it loads almost a couple hundred classes. Koha::Database has done that
already once and we can use it to get the ResultSet "Borrower" as
well, so let's use that. This also make the code more unified because
Koha::Database is used throughout the code instead of Koha::Schema.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 83e0765f448c35c6f387d41fe39feb94b9bc64f3)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f130fd6ec9538fff02582b6dae40e0445f607320)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
C4/Members.pm