[Koha-bugs] [Bug 11714] New: GetBudgetHierarchy needs optimization

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Feb 7 17:57:34 CET 2014


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 at lists.koha-community.org
          Reporter: fridolyn.somers at biblibre.com
        QA Contact: testopia at 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.


More information about the Koha-bugs mailing list