[Zope] Minimal Zope Install - True Story

Toby Dickenson tdickenson@geminidataloggers.com
Fri, 14 Apr 2000 11:03:23 +0100


On Thu, 13 Apr 2000 15:01:59 -0400 (EDT), Pavlos Christoforou
<pavlos@gaaros.com> wrote:

>Correlation might not be straightforward but upper limit estimation should
>be. cPickle is a binary representation of the instance data plus a lot of
>extra info declaring types etc. Ignoring cached objects/data coming from
>external sources (RDBM, etc) which I don't have,

OK...

>then the pickled version
>of the object should place an approximate upper limit for its RAM usage,

...almost...

>unless during object activation/utilization the object requires a lot of
>RAM to do its job (Catalog comes to mind).  

The catch is that this is true for almost all objects. Here are two
examples:

1. A integer stored in a pickle may consume as little as 3 bytes.
However in memory it will exist in a separately malloced integer
object, which typically takes 16 bytes.

2. A DTML method in a pickle is only a little bigger than the size of
it's text. However in memory it will create many instance objects
representing the DTML parse tree. These objects are the ones that
actually perform the rendering. The text is stored in memory too, but
it's only used for management operations. I haven't measured it, but I
wouldn't be suprised if it was 10 times bigger than the pickle.

Toby Dickenson
tdickenson@geminidataloggers.com