[Koha-bugs] [Bug 19792] Reduce number of SQL calls in GetBudgetHierarchy

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Dec 22 15:25:07 CET 2017


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

David Bourgault <david.bourgault at inlibro.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Failed QA                   |Signed Off

--- Comment #6 from David Bourgault <david.bourgault at inlibro.com> ---
I don't think I can move the recursive sub out of GetBudgetHierarchy, since it
calls variables local to that function. If it were moved out it would need to
either rebuild them everytime, which voids the perf boost, or receive them as
parameters, which would make the code less readable, and requires the dev to
know the exact SQL query result to pass.

In this case I strongly believe an anonymous inner function is the best way to
go. As for tests, the current test to budgets.t should be sufficient as this
does not (should not!) change behavior. It is supposed to replace the inner
workings of the function with no impact on input or output.

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


More information about the Koha-bugs mailing list