[Zope-dev] What appears to be a bug in RAMCacheManager which would seem to
affect it's performance
Tim Hoffman
timhoffman@cams.wa.gov.au
08 May 2002 13:05:42 +0800
Hi
Can someone confirm my belief that the following code in
Products/StandardCacheManagers/RAMCacheManager.py is incorrect
(upon which I will raise a collector issue)
try: from cStringIO import dumps
except: from pickle import dumps
I believe it should be
try: from cPickle import dumps
The outcome of this error is that the results from every object that is
associated with a ram cachemanager instance is pickled to see if
it can be cached. And by not using the optimised version, which
will always happen because "dumps" is part of cPickle not cStringIO,
we always get the "slow" version.
Thanks
Tim
P.S. Doesn't pickling the cacheable results seem to be a very expensive
way to determine the suitability of caching the object?