On 8 December 2010 15:29, Jim Fulton <j...@zope.com> wrote:
> The hash table retains a reference to the strings in it.  The
> references aren't weak afaik.

The reference is removed by the custom string dealloc function when
the ref count falls to 0. Interned strings do not linger on.

> What are you thinking of as applications with non-trivial strings?

In content management apps for instance, you have many non-trivial
strings with content, be it shorter descriptions or text bodies.
That's a substantial amount of text if allocated in duplicate or more.

Actually, I think *text* is the only kind of data that ought to take
up significant memory. Binary data ought to be blobbed out of the
database and the rest is just site structure and object overhead.

> The only one I can think of is template source.  That might be better
> served by either storing the source compressed or even storing it in a 
> separate
> object that doesn't need to be in memory except when editing or compiling.

It might make sense to keep a global cache for ZODB-persisted
templates. But I'm not sure if there are so many that it's a burden
directly. This is an app-specific matter though.

I'll try to get some raw numbers out of currently running apps to make
the conversation more substantial.

\malthe
_______________________________________________
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zodb-dev

Reply via email to