[Koha-bugs] [Bug 29483] AllowRenewalIfOtherItemsAvailable has poor performance for records with many items

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Nov 19 17:19:35 CET 2021


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

--- Comment #6 from Nick Clemens <nick at bywatersolutions.com> ---
Created attachment 127884
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127884&action=edit
Bug 29483: Check ItemsAnyAvailableAndNotRestricted once per patron

ItemsAnyAvailableAndNotRestricted can take a long time and create nested loops.
We can check it once per patron, however, this requires us to flip the loops.
Since an item can only be used once, we now add a check to see if this item has
already
been assigned to a borrower.

To test:
1 - Find or create a biblio with 100 items
2 - Place ten 'Next available' holds on a biblio
3 - Set preference 'AllowRenewalIfOtherItemsAvailable' to 'Allow'
    Set circ rules 'On shelf holds allowed' to 'If any unavailable'
4 - Checkout one of the items to a patron, backdated to be overdue
5 - Note a long loading time for the patron's checkouts
6 - Apply patch, restart_all
7 - Patron loads much faster

-- 
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