[ZODB-Dev] memory or cache leak?

Chris Withers chrisw@nipltd.com
Fri, 02 Nov 2001 09:07:13 +0000


Andrew Dalke wrote:
> 
> With my real data set I need to do the sweep about every 100 records.
> I didn't want to expose that requirement to client code so my
> interface always calls cacheFullSweep(4) every 100 calls to
> Molecule.__getitem__.  Seems to work, and the overhead of calling
> the function when it isn't needed is about 1 millisecond.

*sigh*, now I'm jealous...

> > I can't imagine anyone depends on 1 or 2 being treated as 0.
> 
> I completely agree.  'Course, the other solution is to fix the
> documentation to describe this.

Me too, fixing the code rather than the documentation in this case makes mroe
sense to me, although doesn't setting dt to 1 mean that only objects which
haven't been accessed for 1 second or more are collected? So, a call to
cacheMinimize(0) would actually do what you told it to (ie: dump the whole
cache...)

still struggling,

Chris