Bug 26587: Cache libraries in Koha/Template/Plugins/Branches.pm to improve performance
This patch caches the Koha::Library object in a hashmap in the Branches object (GetName, GetURL)
to avoid multiple database lookups while looping many items.
To test:
1. Have a biblio with many items (1000's).
2. View in staff (detail.pl) and opac (opac-detail.pl). Note how long it takes to load.
3. Apply patch.
4. Repeat 2. Note that pages load faster.
Sponsored-by: Lund University Library
JK: replaced tab indendation with spaces Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>