[Zope] Controlling caching of objects

Toby Dickenson tdickenson at geminidataloggers.com
Thu Oct 23 04:58:08 EDT 2003

On Thursday 23 October 2003 08:39, Bjorn Stabell wrote:
> > -----Original Message-----
> > From: Toby Dickenson [mailto:tdickenson at geminidataloggers.com]
> [...]
> > The right term is "deactivate". The main reason for
> > deactivating an object is
> > that the total number of objects exceeds the per-thread
> > limit. There are other reasons.
> Is object cache/memory shared between threads, or is it per thread?

It is per-thread

> If that's the case, is there any reason to limit the number of threads
> in order to conserve memory?  (I read this tip in an old discussion
> thread somewhere.)

Yes. The default of 4 threads is arguably too high. All my applications work 
better with 2 threads, and double the cache size (but still using the same 
total amount of memory)

> If that's not the case, why isn't it the case?  It sounds very wasteful
> in terms of memory use.

They need to be seperate to give isolation between transactions. Some classes 
that allocate large amounts of memory for immutabe objects have custom 
optimisations to share those between threads.

Toby Dickenson

More information about the Zope mailing list