https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35899
Bug ID: 35899
Summary: Performance improvements for build_holds_queue
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P5 - low
Component: Hold requests
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
CC: [email protected]
On a large and busy system the holds queue can take several minutes to build
adding a significant load to the database and koha server.
I have profiled the script and have noticed two major inefficiencies:
1. Calls to C4::Circulation::GetBranchItemRule constitute roughly 35% of the
runtime. But this method can easily be memoized.
2. With LocalHoldsPriority enabled, expensive checks are made for all available
items, even if it is only relevant to do these checks for local items.
Depending on how the system is configured, either the unnecessary loading of
patron objects, or calls to _checkHoldPolicy can take considerable time.
I have prepared two patches which together cuts the runtime of the script with
abouth 50% if LocalHoldsPriority is enabled.
Profiling result before:
https://bv-test-opac.biblioteket.nu/resources/before/index.html
Profiling result after:
https://bv-test-opac.biblioteket.nu/resources/after/index.html
--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
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/