Created attachment 8791 [details] [review] Memoize::Memcached 2x speedup While profiling Koha with memcached turned on I was stunned by NYTProf results: Calls P F Exclus Inclus Subroutine 55 2 1 1.70s 1.70s Memoize::Memcached::EXISTS 55 2 1 1.68s 1.68s Memoize::Memcached::FETCH Code analysts showed that it generates two FETCH requests for each item. Attached patch fixes upstream module and might be beneficial on existing Koha installations which use memcached. It uses shared variable, and it's safe in CGI installations. Having shared variable showed another characteristic of current code: 55 2 1 33.8ms 33.8ms Memoize::Memcached::EXISTS 55 2 1 362µs 362µs Memoize::Memcached::FETCH This is good, but a little bit too fast. Examining hit and miss ratio stored in Koha::Persistant::stats it turns out that we are accessing memcache 106 times, but only 4 times for new values.
Dobrica, this is still valid? Where is the "discussion"?
This report was made on a very old version of Koha and hasn't been updated since. I think we should consider it closed.
(In reply to Owen Leonard from comment #2) > This report was made on a very old version of Koha and hasn't been updated > since. I think we should consider it closed. Bug 16770 removed this dependency.
(In reply to Owen Leonard from comment #2) > This report was made on a very old version of Koha and hasn't been updated > since. I think we should consider it closed. fyi, this is still probably a valid issue for M::M (but, its not technically a Koha bug) http://search.cpan.org/~tcohen/Memoize-Memcached-0.04/lib/Memoize/Memcached.pm i think this M::M bug may describe the problem? https://rt.cpan.org/Public/Bug/Display.html?id=112659