[ZWeb] ZCatalog Issues

Shane Hathaway shane at hathawaymix.org
Wed Jul 14 00:41:40 EDT 2004


On Tuesday 13 July 2004 20:42 pm, Tim Peters wrote:
> [Shane Hathaway]
>
> > It's just an observation.  I postulate it happens because ZODB frees the
> > objects in layers: it peels away all the unreferenced objects, revealing
> > more objects that are now unreferenced, and iterates along those lines.
> > If for some reason it peels off only one object per pass, the total
> > operation is O(n^2 / 2).
>
> Shane, I'm not sure what "flushing the cache" means.

This is what the Zope Management Interface calls it.  To call 
DB.cacheMinimize(), most people go to Control_Panel -> Database -> Flush 
Cache, then push the "minimize" button.

> There's a cache 
> minimization operation, and if that's what it means, since we moved to the
> circular linked-list implementation of the pickle cache that makes at most
> one pass over the cache.  It visits objects from least- to most-recently
> used, ghostifying up-to-date objects as it goes along.  It stops when the
> cache target size is reached, or when it's gone around the ring once,
> whichever happens first.

My understanding may be outdated.  I recall there were two operations: one 
that made a best attempt through a single pass, and another that repeatedly 
scanned the cache, stopping when the previous scan did not evict any objects.

I'll work on reproducing the behavior I've seen.

Shane


More information about the Zope-web mailing list