[koha-commits] main Koha release repository branch 3.14.x updated. v3.14.01-16-ge3858f7

Git repo owner gitmaster at git.koha-community.org
Tue Dec 24 11:40:38 CET 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "main Koha release repository".

The branch, 3.14.x has been updated
       via  e3858f7f630b15e5e0b77d205d0ab64bbc4b8f22 (commit)
       via  e8779ef7011c2ee90cec8e03b3fd76c80a403626 (commit)
       via  985debedecaf5e276dbfb7147f022c05c0ff2c99 (commit)
      from  b8df5e3976da663cb9193b2bf059099503e1a898 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit e3858f7f630b15e5e0b77d205d0ab64bbc4b8f22
Author: Galen Charlton <gmc at esilibrary.com>
Date:   Tue Dec 10 18:21:09 2013 +0000

    Bug 11112: (follow-up) add FIXME
    
    The caching introduced by the main patch is not ideal
    as it won't work correctly if a persistance engine is used.
    
    However, I have good reason to expect that bug 8089 will
    be worked on (because I'm going to do it) so that Koha::Cache
    can be used for this prior to the release of 3.16.
    
    Signed-off-by: Galen Charlton <gmc at esilibrary.com>
    (cherry picked from commit aca1f5f6a9c5fb58e62ab060c272eadc287bb167)
    Signed-off-by: Fridolin SOMERS <fridolin.somers at biblibre.com>

commit e8779ef7011c2ee90cec8e03b3fd76c80a403626
Author: Galen Charlton <gmc at esilibrary.com>
Date:   Tue Dec 10 18:11:37 2013 +0000

    Bug 11112: (follow-up) repair Koha::Calendar->add_holiday()
    
    This patch ensures that the package-level cache is updated
    when add_holiday() is used.  Note that except for the test
    case added by this patch, there doesn't seem to be anything
    that actually calls ->add_holiday(); it may be better to remove it.
    
    Signed-off-by: Galen Charlton <gmc at esilibrary.com>
    (cherry picked from commit 08c47cbfe2517ef36b15a16a94227b854be5eeb9)
    Signed-off-by: Fridolin SOMERS <fridolin.somers at biblibre.com>

commit 985debedecaf5e276dbfb7147f022c05c0ff2c99
Author: Jonathan Druart <jonathan.druart at biblibre.com>
Date:   Wed Oct 16 15:36:30 2013 +0200

    Bug 11112: Koha::Calendar needs some caching
    
    Each time a Koha::Calendar object is created, its constructor retrieves
    all holidays from the database and create a DateTime::Set object with
    all holidays.
    
    [RM note: I've observed that the time it takes DateTime::Set to be
     initialized with a set of dates increases faster than linearly with
     the number of dates.  I think this, more than just retrieving a bunch
     of holidays from the database, is what is most expensive.]
    
    In one of our customer's DB, there are 11085 special_holidays and 598
    repeatable_holidays. When a loan is returned, there are 3 calls to
    Koha::Calendar->new.
    
    This patch adds caching of the holiday list via package-level variables
    as well as lazy fetching of the holidays. (RM note: this means that if
    a persistance engine is in use, updates to the holiday list will not
    be reflected during checkout.  I'm allowing this breakage for now on
    the plan that bug 8089 will be fixed soon and we can switch to using
    Koha::Cache).
    
    Nytprof benchmarks (on a 3.8.x branch):
    In DateTime::Set->from_datetimes:
    3 times (5.49ms+4.90s) by Koha::Calendar::_init at line 80 of Koha/Calendar.pm, avg 1.63s/call
    on a total of 7.67s (of 10.2s), executing 6353333 statements and 3031273 subroutine calls in 147 source files and 36 string evals.
    for the circulation/return.pl page.
    
    Comparing the access_log:
    
    Without the patch:
    checkout: time=2759838
    checkin: time=1832751
    
    Without the patch and with overdues:
    checkout: time=1086727 + time=1144706
    checkin: time=3928854 (x2)
    
    With the patch and overdues:
    checkout: time=1077839 + time=1060886
    checkin: time=2420898
    
    Test plan:
    - checkout an item with a return date < today
    - checkin the item and verify the suspension period is well calculated
      (depending on the holidays).
    - prove t/db_dependent/Holidays.t
    - t/Calendar.t
    
    Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
    Signed-off-by: Brendan Gallagher <brendan at bywatersolutions.com>
    Signed-off-by: Galen Charlton <gmc at esilibrary.com>
    (cherry picked from commit a98b239dbfbf0d0e9c6f6593c3457c18c79584a9)
    Signed-off-by: Fridolin SOMERS <fridolin.somers at biblibre.com>

-----------------------------------------------------------------------

Summary of changes:
 Koha/Calendar.pm          |   46 +++++++++++++++++++++++++++++++++++++--------
 t/db_dependent/Holidays.t |   12 +++++++++++-
 2 files changed, 49 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
main Koha release repository


More information about the koha-commits mailing list