Re: [ZODB-Dev] How do I find out the size of a subtree of the object graph?

2009-09-14 Thread Jim Fulton
On Mon, Sep 14, 2009 at 10:43 AM, David Glick wrote: > On Sep 14, 2009, at 7:04 AM, Jim Fulton wrote: >> >> On Mon, Sep 14, 2009 at 7:10 AM, Chris Withers >> wrote: >>> >>> Jim Fulton wrote: ZODB doesn't provide any direct support because it has no notion of tree. >>> >>> Does it h

Re: [ZODB-Dev] How do I find out the size of a subtree of the object graph?

2009-09-14 Thread David Glick
On Sep 14, 2009, at 7:04 AM, Jim Fulton wrote: > On Mon, Sep 14, 2009 at 7:10 AM, Chris Withers > wrote: >> Jim Fulton wrote: >>> >>> ZODB doesn't provide any direct support because it has no notion >>> of tree. >> >> Does it have any notion of object size on disk for a given object? > > Not d

Re: [ZODB-Dev] How do I find out the size of a subtree of the object graph?

2009-09-14 Thread Jim Fulton
On Mon, Sep 14, 2009 at 7:10 AM, Chris Withers wrote: > Jim Fulton wrote: >> >> ZODB doesn't provide any direct support because it has no notion of tree. > > Does it have any notion of object size on disk for a given object? Not directly, but you can do: len(ob._p_jar.db().storage.load(ob._p_o

Re: [ZODB-Dev] How do I find out the size of a subtree of the object graph?

2009-09-14 Thread Jens Vagelpohl
On Sep 14, 2009, at 13:27 , Chris Withers wrote: Jens Vagelpohl wrote: Sadly, when you're trying to figure out which folder is using all the space on a disk that's running out of space, that's not practical... How about simply writing a script that crawls the ZODB and gives you paths and s

Re: [ZODB-Dev] How do I find out the size of a subtree of the object graph?

2009-09-14 Thread Andreas Jung
On 14.09.09 13:27, Chris Withers wrote: > Jens Vagelpohl wrote: > >> >>> Sadly, when you're trying to figure out which folder is using all the >>> space on a disk that's running out of space, that's not practical... >>> >> How about simply writing a script that crawls the ZODB and gi

Re: [ZODB-Dev] How do I find out the size of a subtree of the object graph?

2009-09-14 Thread Chris Withers
Jens Vagelpohl wrote: > >> Sadly, when you're trying to figure out which folder is using all the >> space on a disk that's running out of space, that's not practical... > > How about simply writing a script that crawls the ZODB and gives you > paths and sizes? Indeed, and what's the magic incan

Re: [ZODB-Dev] How do I find out the size of a subtree of the object graph?

2009-09-14 Thread Jens Vagelpohl
On Sep 14, 2009, at 13:10 , Chris Withers wrote: Jim Fulton wrote: ZODB doesn't provide any direct support because it has no notion of tree. Does it have any notion of object size on disk for a given object? In Zope 2, you could export the folder and look at the size of the export. Sad

Re: [ZODB-Dev] How do I find out the size of a subtree of the object graph?

2009-09-14 Thread Chris Withers
Jim Fulton wrote: > ZODB doesn't provide any direct support because it has no notion of tree. Does it have any notion of object size on disk for a given object? > In Zope 2, you could export the folder and look at the size of the export. Sadly, when you're trying to figure out which folder is us

Re: [ZODB-Dev] How do I find out the size of a subtree of the object graph?

2009-09-14 Thread Jim Fulton
On Mon, Sep 14, 2009 at 5:55 AM, Chris Withers wrote: > Hi All, > > As the subject line says with the following definitions: > > - size = size on disk, in Mb > > - subtee = Zope folderish type things, in this case... ZODB doesn't provide any direct support because it has no notion of tree. In Zo

[ZODB-Dev] How do I find out the size of a subtree of the object graph?

2009-09-14 Thread Chris Withers
Hi All, As the subject line says with the following definitions: - size = size on disk, in Mb - subtee = Zope folderish type things, in this case... cheers, Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk __