[Koha-bugs] [Bug 29474] Automatic renewals cronjob is slow on systems with large numbers of reserves

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sun Nov 14 08:55:17 CET 2021


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

Joonas Kylmälä <joonas.kylmala at iki.fi> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Needs Signoff               |Failed QA

--- Comment #10 from Joonas Kylmälä <joonas.kylmala at iki.fi> ---
The last patch is wrong, it checks the availability for the patron who is
wanting to do the renewal and not the other patrons as it should (notice that
the $patron variable is redefined here). You could however achieve the
performance boost by adding the $items_any_available value to a hash table
where the keys are borrowernumbers. However, I think we might be able to avoid
that (it makes the code pretty ugly imho if we use the hash table) by splitting
somehow the while loops and maybe ordering it so that we iterate patrons in the
outer loop. Like I think "next if IsItemOnHoldAndFound( $item->itemnumber );"
could be moved to its own loop.

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


More information about the Koha-bugs mailing list