[Koha-bugs] [Bug 16166] Improve L1 cache performance

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Apr 13 14:06:30 CEST 2016


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16166

Jacek Ablewicz <ablewicz at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #49670|0                           |1
        is obsolete|                            |
  Attachment #49729|0                           |1
        is obsolete|                            |
  Attachment #49739|0                           |1
        is obsolete|                            |

--- Comment #10 from Jacek Ablewicz <ablewicz at gmail.com> ---
Created attachment 50192
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=50192&action=edit
Bug 16166: Improve L1 cache performance and safety

Bug 16044 introduced two-level caching mechanism to Koha::Cache. By
default, get_from_cache() returns a deep copy of the data structures
stored in L1 cache (aka "safe mode"). For extremely big and/or complex
data structures (like MARC framework hash-of-hashes-of-hashes returned
by GetMarcStructure() ), deep-cloning is currently very sub-optimal
(i.e., 2-3x slower after Bug 16044); this patch addresses that particular
issue. It also fixes some borderline "safety" isuess remaining
after Bug 16044 (i.e., 1st get_from_cache() call being implicitly
unsafe etc.) and provides the ability to intermix "safe" and "unsafe"
cache feches, eliminating the risk involved with "unsafe" calls
possibly compromising further "safe" calls.

Test plan:

1) apply patch
2) flush L2 cache if necessary (restart memcached daemon)
3) profile GetMarcStructure() calls before / after patch, e.g. by
running some script which calls it often (like catalogue search
w/ XSLT processing turned on, etc.)
4) after Bug 16044 + Bug 16166, GetMarcStructure() should be faster than
before, in all possible circumstances
5) prove t/Cache.t
6) after testing, before returning to the master branch, flush L2 cache
again (restart memcached daemon) - otherwise all system preferences
returned from L2 cache would be suffixed with '-CF1'

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


More information about the Koha-bugs mailing list