[Koha-bugs] [Bug 29702] all_libraries routine in library groups make a DB call per member of group

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Dec 15 16:47:24 CET 2021


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

--- Comment #1 from Nick Clemens <nick at bywatersolutions.com> ---
Created attachment 128572
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128572&action=edit
Bug 29702: fetch group libraries in a single call

The current code gets all group members, then loops through and fetches the
library if there is a
branchcode, or recursively calls itself if a group. This slows down
performance.

We can utilize the 'libraries' method to get all child libraries at once, then
make a check
for child groups separately

To recreate:
 1 - Add 100 items to a biblio
 2 - Define a library group as a hold group
 3 - Add all libraries to the group
 4 - Set 'Default checkout, hold and return policy'->'Hold pickup library
match' = 'Any library'
 5 - place a hold on the record and note load time after patron is selected
 6 - Set 'Default checkout, hold and return policy'->'Hold pickup library
match' = 'Patrons hold group'
 7 - place a hold, note longer load time after patron selection
 8 - Apply patch
 9 - note improvement
10 - prove -v t/db_dependent/Koha/Libraries.t

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


More information about the Koha-bugs mailing list