https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19884
Bug ID: 19884
Summary: Improve performance of GetItem
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P5 - low
Component: Architecture, internals, and plumbing
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
While benchmarking Koha trying to improve indexing speed
DBIx::Class::ResultSet->find() in C4::Koha::Getitem stood out as a major
bottleneck. I looked through the code, and it's only when 'item-level_itypes'
is enabled when the actual item object is needed, if not the function can be
optimized by only fetching the the data through the much faster low-level DBI
interface. This is of course a bit of a kludge, and I would normally avoid this
type of micro-optimization, but with this fix we managed to shave a couple of
hours of a full re-indexing, and get it done during closing hours. I have also
added some more tests to try to catch any possible future issues this change
might cause. If more stuff needs to be fetched through the Item-object there
could be issues, but this should be clearly pointed out in the code. I also
removed an extra call to GetItem() in GetMarcItem() by making it accept an item
object or item id as argument, and only fetch the item if needed, cutting the
actual calls to GetItem by about half.
--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://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/