[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
Sun Dec 18 20:51:48 CET 2016


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

Josef Moravec <josef.moravec at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |josef.moravec at gmail.com

--- Comment #10 from Josef Moravec <josef.moravec at gmail.com> ---
(In reply to Lari Taskula from comment #5)
> 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.

I have :
80.13
160.26
318.47
617.28

> 
> 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.

And: 
581.40
568.18
581.40
581.40

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


More information about the Koha-bugs mailing list