http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11714 Bug ID: 11714 Summary: GetBudgetHierarchy needs optimization Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: fridolyn.somers@biblibre.com QA Contact: testopia@bugs.koha-community.org The method C4::Budgets::GetBudgetHierarchy() retreives from database budgets in an array containing a tree of budgets (parent -> children -> children, ...). The code generating this tree with the SQL results needs optimization because when a lot of budgets exists, it can run during several minutes. Have a look at code resume : while (1) { foreach my $r (@res) { foreach my $r2 (@res) { } } } With 1000 budgets there can be 1000x1000x1000 loops ... -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.