[Koha-bugs] [Bug 17783] Optimize Koha::IssuingRules->get_effective_issuing_rule
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Thu Dec 15 18:50:17 CET 2016
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17783
Lari Taskula <lari.taskula at jns.fi> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|gmcharlt at gmail.com |lari.taskula at jns.fi
Depends on| |17599
--- Comment #5 from Lari Taskula <lari.taskula at jns.fi> ---
Definitions:
We want to find an issuing rule with parameters branchcode 'B', categorycode
'C' and itemtype 'I'.
For current implementation,
- Best case = there is an issuing rule defined with 'B', 'C' and 'I'.
- Second best case = there is an issuing rule defined with 'B', 'C' and '*'.
- Mid case = there is an issuing rule defined with 'B', '*', '*'.
- Worst case = matching issuing rule will be '*', '*', '*'.
(These are following the order defined in circulation & fines rules page)
My results:
OLD IMPLEMENTATION:
ok 1 - In worst case, get_effective_issuing_rule finds matching rule 74.29
times per second.
ok 2 - In mid case, get_effective_issuing_rule finds matching rule 144.09 times
per second.
ok 3 - In second best case, get_effective_issuing_rule finds matching rule
289.02 times per second.
ok 4 - In best case, get_effective_issuing_rule finds matching rule 561.80
times per second.
NEW IMPLEMENTATION (= after applying last patch):
ok 1 - In worst case, get_effective_issuing_rule finds matching rule 434.78
times per second.
ok 2 - In mid case, get_effective_issuing_rule finds matching rule 427.35 times
per second.
ok 3 - In second best case, get_effective_issuing_rule finds matching rule
431.03 times per second.
ok 4 - In best case, get_effective_issuing_rule finds matching rule 423.73
times per second.
Referenced Bugs:
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17599
[Bug 17599] Move C4::Circulation::GetIssuingRule to
Koha::IssuingRules->get_effective_issuing_rule
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list