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

--- Comment #112 from Martin Renvoize (ashimema) 
<[email protected]> ---
Created attachment 194313
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=194313&action=edit
Bug 14962: (QA follow-up) Eliminate N+1 Koha::Items->find in search result
rendering

Five display-aware helper closures in C4::Search each independently called
Koha::Items->find($item->{itemnumber}). For a search page with 20 results
and 5 items each, this produced up to 500 extra DB queries per page when
UseDisplayModule was enabled.

Introduce a shared $item_obj_cache keyed by itemnumber so the item object
is fetched at most once per item across all five closures.

Sponsored-by: ByWater Solutions
Signed-of-by: Martin Renvoize <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to