[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
Wed Mar 23 23:22:08 CET 2022
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29483
Nick Clemens <nick at bywatersolutions.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #129500|0 |1
is obsolete| |
--- Comment #21 from Nick Clemens <nick at bywatersolutions.com> ---
Created attachment 132095
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=132095&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
Signed-off-by: Andrew Fuerste-Henry <andrew at bywatersolutions.com>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list