peter bengtson wrote:
> How (and if) is it possible to deduce the total size of a website from the
> filesize of Exported ZEXP files in Zope?
> If it's not possible to find a formula for the ratio of zopestuff and
> htmlstuff, is there any other way of getting a good estimate of "how big a
> site is"?

The size of a ZEXP should be a pretty good estimate.  Its structure is
quite similar to the object database.  The differences are the lack of
history, versions, and database index information in the ZEXP.

However, it would also be possible to write an external method which
computes directly the size of all pickles in a branch.  In fact, here's
a start:

def compute_size(self):
    oid = self._p_oid
    jar = self._p_jar
    p, serial = jar._storage.load(oid, jar._version)
    size = len(p)
    for subob in self.objectValues():
        size = size + compute_size(subob)
    return size

It won't work at the root of a site, but it will work most other places.


Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to