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

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Jan 5 13:20:42 CET 2018


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

--- Comment #32 from David Gustafsson <glasklas at gmail.com> ---
I made variants of GetMarcBiblio and EmbedItemsInMarcBiblio (GetMarcBiblios and
EmbedItemsInMarcBiblio) that accepts multiple biblionumbers instead of just
one. This way all items can be loaded at once for all of these biblios,
avoiding the overhead of callings search/find once for each item. Running this
script (https://gist.github.com/gnucifer/1e33f9aa7155b1b771baaa357dfc7141) it
seems to give about the same performance boost as the SQL-hack. When using this
strategy just benchmarking GetItems is not feasible since the speedup is
because GetItems now need to run a fraction of the times (about 1/2000 for a
batch size of 2000) as before, making the impact of DBIx-search having a large
overhead preparing the query compared to the low lever interface not matter
that much.

I will try to produce a before/after NYTProf-flamegraph with the latest
benchmarking script (it's a little bit messy since does not have the production
data available in my dev-box, and need to produce the results in our staging
environment).

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


More information about the Koha-bugs mailing list