From f2178bac3fd7639ba49ade941813febee1d95794 Mon Sep 17 00:00:00 2001 From: Robin Sheat Date: Tue, 15 Oct 2013 17:58:04 +1300 Subject: [PATCH] Bug 11051 - remove caching of GetMarcStructure Profiling suggests that this is actually ~1s slower with caching enabled, probably due to serialisation overheads. Compare uncached: http://debian.koha-community.org/~robin/opac-search/usr-share-koha-lib-C4-XSLT-pm-1282-line.html#78 to cached: http://debian.koha-community.org/~robin/opac-search-cached/nytprof/usr-share-koha-lib-C4-XSLT-pm-1320-line.html#78 Test plan (please do this, more data points are good): * set up an instance with memcache available but not used * run the profiler on it * enable the use of memcache * run the profiler on it, note that the caching is being used and the code runs slower. * apply the patch * run the profiler again with memcache, note that the caching is not being used and things are back to being speedy. A quick primer to using the profiler: * apt-get install libdevel-nytprof-perl * sudo -u library-koha env MEMCACHED_SERVERS=localhost:11211 MEMCACHED_NAMESPACE=library-koha-opac KOHA_CONF=/etc/koha/sites/library/koha-conf.xml PERL5LIB=/usr/share/koha/lib SERVER_PORT=80 perl -d:NYTProf /usr/share/koha/opac/cgi-bin/opac/opac-search.pl 'q=a' * this will create nytprof.out in the current dir (use /tmp) * run nytprofhtml to produce HTML output. * remove/include the MEMCACHED variables to turn caching on/off globally. --- C4/Biblio.pm | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index cf83ae6..45e2c6f 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -140,16 +140,6 @@ BEGIN { ); } -eval { - if (C4::Context->ismemcached) { - require Memoize::Memcached; - import Memoize::Memcached qw(memoize_memcached); - - memoize_memcached( 'GetMarcStructure', - memcached => C4::Context->memcached); - } -}; - =head1 NAME C4::Biblio - cataloging management functions -- 1.8.1.2