For records with many item level holds by many patrons ( with multiple item level holds per record ), we fetch the item and patron from the database fresh on each loop iteration. If we store these in a hash it should speed this up in the case of large numbers of these holds.
Created attachment 152122 [details] [review] Bug 33942: Improve performance of local holds priority by temporarily caching patrons and items Test Plan: 1) Apply this patch 2) prove -r t/db_dependent/Hold* 3) Note all tests continue to pass
Using index info to reconstruct a base tree... M C4/Reserves.pm Falling back to patching base and 3-way merge... Auto-merging C4/Reserves.pm CONFLICT (content): Merge conflict in C4/Reserves.pm error: Failed to merge in the changes. Patch failed at 0001 Bug 33942: Improve performance of local holds priority by temporarily caching patrons and items
This seems to only offer benefit in a small number of edge cases, we won't pursue this one