[Koha-devel] [Discussion Tech] Cache handling in koha

Paul paul.a at aandc.org
Fri Feb 10 01:21:30 CET 2012


At 08:43 AM 2/10/2012 +1300, Robin Sheat wrote:
>Op 10-02-12 03:35, Paul schreef:
> > Is there enough repetitive math in Koha to justify memoization?  I've
> > been looking at caching (specifically memcached 1.4.13) for faster
> > access to "text" (as opposed to calculated numeric values)
>
>Generalise "math" to "functions that take input and produce output based
>just on that", and that's a large amount of most programs. In the case
>of Koha, a lot of them are relatively slow operations: talking to zebra,
>talking to a database, and so on.

Thanks Robin.  But I'm afraid you've lost me to a great extent.  Queries to 
a database (be it zebra or mysql) are "one-offs" dependant on client input; 
and yes they are the slow point (high server time cost) and need to operate 
from memory rather than a HD read, hence "caching" in some form or another.

But how does memoization improve on the concept that all functions are|can 
be cached in a more "classic" manner (as can be mysql and possibly 
zebra.)  The concept of memoization is to eliminate *repetitivity* (classic 
case; memoize 17! and calculating either 15! or 19! reduces to 2 operations.)

Could you give a specific Koha scenario where you feel memoization could be 
advantageous?  I'm not trying to be "contrary" -- quite the opposite, I've 
been spending some effort on improving server response time and would be 
more than happy to go the extra mile to improve matters (and happy to spend 
some time in the sandbox.)

Best regards - Paul 



More information about the Koha-devel mailing list