[Koha-bugs] [Bug 14315] New: Slow checkouts, caused by many single_holidays definitions

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Jun 2 12:43:23 CEST 2015


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14315

            Bug ID: 14315
           Summary: Slow checkouts, caused by many single_holidays
                    definitions
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P5 - low
         Component: Circulation
          Assignee: koha-bugs at lists.koha-community.org
          Reporter: mtj at kohaaloha.com
        QA Contact: testopia at bugs.koha-community.org
                CC: gmcharlt at gmail.com, kyle.m.hall at gmail.com

i’ve been poking at a problematic Koha with slow checkout speed, that has
around 400 special_holidays defined - only 50 special_holidays are ‘current’. 

i define ’current’ as holidays that fall after the issue_date, 

i’ve narrowed the problem down to Koha doing much slow date math on all the
holiday rows in the special_holidays table, during a checkout

it seems for some situations (like checkouts) Koha only needs to process
current holidays, and can safely skip older holidays for processing

to me, the most obvious solution seems to be to allow the
Koha::Calendar::single_holidays() sub to be passed an ‘issue_date’ arg

this would allow single_holidays() to skip any holiday rows older than the
$issue_date, for processing

Q: is there a better way for single_holidays() to know the issue_date, other
than being passed it? 


i’ve made some hardcoded experiments with the single_holidays() sub skipping
old holidays, and seen a 65% improvement to checkout times

tested in 3.20.0

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


More information about the Koha-bugs mailing list