[Koha-bugs] [Bug 19884] Improve performance of GetItem

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Jan 3 14:58:52 CET 2018


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

--- Comment #18 from David Gustafsson <glasklas at gmail.com> ---
When item-level_itypes = 0, the code run is pretty similar to master with patch
applied, the only difference being ->search is used to fetch multiple items
instead of ->find for each one. But this only results in a pretty small
performance gain as demonstrated by the above benchmarks.

So the interesting case to benchmark is when item-level_itypes = 1 (which also
seems to be the most commonly used setting), and the NYTProf screenshots 
attached should clearly show that DBIx::Class::ResultSet::find (or
DBIx::Class::ResultSet::search which has similar performance) is the culprit.
But I can generate two new ones for DBIx::Class::ResultSet::search with
multiple items (10 like in the previous example) to show that the same is true
for ->search when loading multiple items.

effective_itemtype() is only expensive when item-level_itypes = 0 the biblio is
fetched though a relation, but this fix is not designed to address the case
when item-level_itypes = 0 since it is much harder to optimize.

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


More information about the Koha-bugs mailing list