[Bug 19792] New: Reduce number of SQL calls in GetBudgetHierarchy
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19792 Bug ID: 19792 Summary: Reduce number of SQL calls in GetBudgetHierarchy Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Acquisitions Assignee: david.bourgault@inlibro.com Reporter: david.bourgault@inlibro.com QA Contact: testopia@bugs.koha-community.org The way GetBudgetHierarchy works right now can result in a (very) high number of SQL calls for databases with many budgets. This causes slow downs and performance issues for some libraries. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19792 David Bourgault <david.bourgault@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19792 --- Comment #1 from David Bourgault <david.bourgault@inlibro.com> --- Created attachment 69702 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=69702&action=edit Bug 19792 - Perf. boost for GetBudgetHierarchy This patches reduces the number of SQL calls by combining multiple calls to the recursive functions GetBudgetSpent(), GetBudgetOrdered(), etc. into 4 big queries. It also removes duplicate function calls from acqui-home.pl Test plan: 0) Visit Acquisition home 0) Apply patch 1) Refresh page. It shoud look identical. 2) prove t/db_dependent/budgets.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19792 David Bourgault <david.bourgault@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |philippe.blouin@inlibro.com --- Comment #2 from David Bourgault <david.bourgault@inlibro.com> --- *** Bug 19586 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19792 --- Comment #3 from David Bourgault <david.bourgault@inlibro.com> ---
From Bug 19586 (codebase is essentially the same):
I used the followup patch with CCSR to cut the DB calls from 30000 to 5. Display idle time went from 30+ seconds to 1.
-- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19792 jmbroust <jean-manuel.broust@univ-lyon2.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jean-manuel.broust@univ-lyo | |n2.fr -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19792 Marjorie Barry-Vila <marjorie.barry-vila@collecto.ca> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |marjorie.barry-vila@collect | |o.ca -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19792 Jon Knight <J.P.Knight@lboro.ac.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19792 Jon Knight <J.P.Knight@lboro.ac.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #69702|0 |1 is obsolete| | --- Comment #4 from Jon Knight <J.P.Knight@lboro.ac.uk> --- Created attachment 69960 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=69960&action=edit Bug 19792 - Perf. boost for GetBudgetHierarchy This patches reduces the number of SQL calls by combining multiple calls to the recursive functions GetBudgetSpent(), GetBudgetOrdered(), etc. into 4 big queries. It also removes duplicate function calls from acqui-home.pl Test plan: 0) Visit Acquisition home 0) Apply patch 1) Refresh page. It shoud look identical. 2) prove t/db_dependent/budgets.t Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19792 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |m.de.rooy@rijksmuseum.nl --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- I like the idea of such a performance boost. Could you move the anonymous sub out of GetBudgetHierarchy? Can it be tested separately? Or do you think that the current code in Budgets.t sufficiently covers your changes (including processing a budget tree) ? Changing status to reflect need for some adjustments/feedback. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19792 David Bourgault <david.bourgault@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off --- Comment #6 from David Bourgault <david.bourgault@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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19792 --- Comment #7 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to David Bourgault from comment #6)
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.
Will add a (trivial) follow-up that times around the same, and improves imo readability. Since we just pass references to hash structures, we are not rebuilding structures. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19792 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #69960|0 |1 is obsolete| | --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 70296 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=70296&action=edit Bug 19792 - Perf. boost for GetBudgetHierarchy This patches reduces the number of SQL calls by combining multiple calls to the recursive functions GetBudgetSpent(), GetBudgetOrdered(), etc. into 4 big queries. It also removes duplicate function calls from acqui-home.pl Test plan: 0) Visit Acquisition home 0) Apply patch 1) Refresh page. It shoud look identical. 2) prove t/db_dependent/budgets.t Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19792 --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 70297 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=70297&action=edit Bug 19792: (QA follow-up) Move anonymous sub out of GetHierarchy Test plan: Run t/db_dependent/Budgets.t. Without both patches, running the test is slower than with only the first or both patches. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19792 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #70297|0 |1 is obsolete| | --- Comment #10 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 70298 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=70298&action=edit Bug 19792: (QA follow-up) Move anonymous sub out of GetHierarchy Test plan: Run t/db_dependent/Budgets.t. Without both patches, running the test is slower than with only the first or both patches. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19792 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19792 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19792 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org Status|Passed QA |In Discussion --- Comment #11 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I am not convinced. 1. I prefer the version without Marcel's patch (especially because of the size of the parameter list) 2. GetBudgetHierarchy is called from a lot of other places, with a budget_id For all these calls we are going to get worst performance(?) 3. GetBudgetHierarchy is not tested when called without parameter 4. There is a FIXME you removed, but you did not fix the problem, you hid it 5.
This causes slow downs and performance issues for some libraries.
How many budgets/funds? What are the performances before/after this patch? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19792 --- Comment #12 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 70306 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=70306&action=edit Bug 19792: Few minor fixes - No string extrapolation needed on SQL queries - '== undef' must be written 'if not defined' -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19792 --- Comment #13 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Jonathan Druart from comment #11)
1. I prefer the version without Marcel's patch (especially because of the size of the parameter list)
I have seen worse :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19792 Nicolas Legrand <nicolas.legrand@bulac.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nicolas.legrand@bulac.fr --- Comment #14 from Nicolas Legrand <nicolas.legrand@bulac.fr> --- Well, what about a prompt correction such as : - by default on acquisition home, GetBudgetHierarchy loads the last budget period - add a form on acquisition home to make GetBudgetHierarchy choose a different budget period or all of them It remains bloated, but it'll be more expeditious for those who appreciate having an unreasonable amount of budgets. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19792 Séverine Queune <severine.queune@bulac.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |severine.queune@bulac.fr -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19792 --- Comment #15 from Blou <philippe.blouin@inlibro.com> ---
How many budgets/funds? What are the performances before/after this patch?
Over 500 aqbudgets. Performance went from 30+ seconds to less than 1 second. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19792 --- Comment #16 from Blou <philippe.blouin@inlibro.com> --- (In reply to Nicolas Legrand from comment #14)
Well, what about a prompt correction such as :
- by default on acquisition home, GetBudgetHierarchy loads the last budget period - add a form on acquisition home to make GetBudgetHierarchy choose a different budget period or all of them
Prompt correction? As in simple & fast? There's nothing quick and dirty about changing default behavior in a screen. That would be a totally different ticket. Although, feel welcome to pile on this one. We fixed it for the sponsor, we pointed it to the community, but if it wants to go in a different direction it's as well, we're pretty detached regarding it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19792 --- Comment #17 from Nicolas Legrand <nicolas.legrand@bulac.fr> --- I did a benchmark on a 16.11.00 with NYTProf, with and without the patch, with GetBudgetHierarchy being called with arguments. We have 517 aqbudgets lines. acqui-home without 19792 ran in 19.5s, 4.83s is spent in GetBudgetHierarchy. acqui-home with 19792 ran in 12.3s, 38.6ms is spent in GetBudgetHierarchy. So it does improve our performances even when GetBudgetHierarchy is called without arguments. I'll test monday on orderreceive which load GetBudgetHierarchy with a budgetid. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19792 --- Comment #18 from Nicolas Legrand <nicolas.legrand@bulac.fr> --- (In reply to Blou from comment #16)
(In reply to Nicolas Legrand from comment #14) [...]
Prompt correction? As in simple & fast? There's nothing quick and dirty about changing default behavior in a screen. That would be a totally different ticket.
Ha sure! Nevertheless, I didn't mean “quick and dirty”. For the moment, I hardcoded the budgetid for GetBudgetHierarchy in acquisition home. That's quick and dirty ;). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19792 --- Comment #19 from Nicolas Legrand <nicolas.legrand@bulac.fr> --- I just tried NYTProf on orderreceive.pl which loaded twice GetBudgetHierarchy with a budget id. orderreceive without 19792 ran in 6.05s, 38.9ms is spent in GetBudgetHierarchy. orderreceive with 19792 ran in 4.81s, 359ms is spent in GetBudgetHierarchy. Therefore, the function is still faster with this patch, even when launched with a budget id. We will use this patch in production as it saves some seconds in a module that became a sluggishness nightmare since 16.11. We would like to warmly thank InLibro and Collecto for this improvement! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19792 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #20 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Nicolas Legrand from comment #14)
Well, what about a prompt correction such as :
- by default on acquisition home, GetBudgetHierarchy loads the last budget period
We have libraries with multiple active budgets in the same or similar timeframes (timeframes could overlap, external funds for 2 years, regular budget for 1 year, ...). If we do this, I'd prefer to default to active budgets and only load inactive on demand. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19792 Charles Farmer <charles.farmer@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #70296|0 |1 is obsolete| | --- Comment #21 from Charles Farmer <charles.farmer@inlibro.com> --- Created attachment 71989 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=71989&action=edit Bug 19792 - Perf. boost for GetBudgetHierarchy This patches reduces the number of SQL calls by combining multiple calls to the recursive functions GetBudgetSpent(), GetBudgetOrdered(), etc. into 4 big queries. It also removes duplicate function calls from acqui-home.pl Test plan: 0) Visit Acquisition home 0) Apply patch 1) Refresh page. It shoud look identical. 2) prove t/db_dependent/budgets.t Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19792 Charles Farmer <charles.farmer@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #70298|0 |1 is obsolete| | --- Comment #22 from Charles Farmer <charles.farmer@inlibro.com> --- Created attachment 71990 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=71990&action=edit Bug 19792: (QA follow-up) Move anonymous sub out of GetHierarchy Test plan: Run t/db_dependent/Budgets.t. Without both patches, running the test is slower than with only the first or both patches. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19792 Charles Farmer <charles.farmer@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #70306|0 |1 is obsolete| | --- Comment #23 from Charles Farmer <charles.farmer@inlibro.com> --- Created attachment 71991 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=71991&action=edit Bug 19792: Few minor fixes - No string extrapolation needed on SQL queries - '== undef' must be written 'if not defined' -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19792 Charles Farmer <charles.farmer@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |charles.farmer@inlibro.com --- Comment #24 from Charles Farmer <charles.farmer@inlibro.com> --- Rebasing over the new version of acqui/acqui-home.pl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19792 David Bourgault <david.bourgault@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|david.bourgault@inlibro.com |charles.farmer@inlibro.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19792 Charles Farmer <charles.farmer@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19792 --- Comment #25 from Jon Knight <J.P.Knight@lboro.ac.uk> --- Created attachment 74983 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=74983&action=edit [SIGNED-OFF] Bug 19792 - Perf. boost for GetBudgetHierarchy This patches reduces the number of SQL calls by combining multiple calls to the recursive functions GetBudgetSpent(), GetBudgetOrdered(), etc. into 4 big queries. It also removes duplicate function calls from acqui-home.pl Test plan: 0) Visit Acquisition home 0) Apply patch 1) Refresh page. It shoud look identical. 2) prove t/db_dependent/Budgets.t Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19792 --- Comment #26 from Jon Knight <J.P.Knight@lboro.ac.uk> --- Created attachment 74984 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=74984&action=edit [SIGNED-OFF] Bug 19792: (QA follow-up) Move anonymous sub out of GetHierarchy Test plan: Run t/db_dependent/Budgets.t. Without both patches, running the test is slower than with only the first or both patches. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19792 --- Comment #27 from Jon Knight <J.P.Knight@lboro.ac.uk> --- Created attachment 74985 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=74985&action=edit [SIGNED-OFF] Bug 19792: Few minor fixes - No string extrapolation needed on SQL queries - '== undef' must be written 'if not defined' Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19792 Jon Knight <J.P.Knight@lboro.ac.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |J.P.Knight@lboro.ac.uk Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19792 --- Comment #28 from Jon Knight <J.P.Knight@lboro.ac.uk> --- Oh, and whilst signing off again, I noted the speed increase running the tests. Not huge but there is one even on a system with limited budgets. Without these patches: real 0m2.269s user 0m1.712s sys 0m0.344s With these patches: real 0m1.982s user 0m1.548s sys 0m0.308s -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19792 Charles Farmer <charles.farmer@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #71991|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19792 Charles Farmer <charles.farmer@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #71990|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19792 Charles Farmer <charles.farmer@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #71989|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19792 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #74983|0 |1 is obsolete| | Attachment #74984|0 |1 is obsolete| | Attachment #74985|0 |1 is obsolete| | --- Comment #29 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 75258 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75258&action=edit Bug 19792: Performance boost for GetBudgetHierarchy This patches reduces the number of SQL calls by combining multiple calls to the recursive functions GetBudgetSpent(), GetBudgetOrdered(), etc. into 4 big queries. It also removes duplicate function calls from acqui-home.pl Test plan: 0) Visit Acquisition home 0) Apply patch 1) Refresh page. It shoud look identical. 2) prove t/db_dependent/budgets.t Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19792 --- Comment #30 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 75259 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75259&action=edit Bug 19792: (QA follow-up) Move anonymous sub out of GetHierarchy Test plan: Run t/db_dependent/Budgets.t. Without both patches, running the test is slower than with only the first or both patches. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19792 --- Comment #31 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 75260 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75260&action=edit Bug 19792: Few minor fixes - No string extrapolation needed on SQL queries - '== undef' must be written 'if not defined' Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19792 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19792 --- Comment #32 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Back into PQA, no strong attachment to the second patch, just preferential of course ;) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19792 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #33 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 18.05, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19792 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Status|Pushed to Master |Pushed to Stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19792 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to Stable |RESOLVED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org