[BlueBream] [Zope-dev] Reg. persisting data in ZODB via forms

Tres Seaver tseaver at palladion.com
Wed Jun 8 13:46:31 EDT 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 06/08/2011 01:40 PM, Marius Gedminas wrote:
> On Wed, Jun 08, 2011 at 06:20:26PM +0530, Joe Steeve wrote:
>> As I mentioned on a follow-up post, we figured the 'Persistent' part. :)
>>
>> On Wed, 2011-06-08 at 13:29 +0100, Laurence Rowe wrote:
>>> My guess is that the ObjectModifiedEvent is dispatched to your
>>> object's parent and causes something to change there, with the side
>>> effect of storing your updated object.
>>
>> Even if the object's parent (a btree-container) had changed, will it
>> attempt to force-store its entire child-tree? I am trying to imagine the
>> effect of it on a huge tree.
> 
> The smallest unit that is ever written to a ZODB is one persistent object
> (with all its nonpersistent attributes/items, recursively).
> 
> BTrees use multiple persistent buckets for their state and are very
> efficient, storage-wise.  But this only matters when you're
> adding/removing items to a BTree.  If you're modifying a persistent
> object stored in a BTree, the BTree itself remains unmodified and does
> not need to be re-written 

Likewise, if you modify a non-persistent attribute of a persistent
object which also has some attributes which are themselves persistent,
only that object is re-written.



Tres.
- -- 
===================================================================
Tres Seaver          +1 540-429-0999          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk3vtXcACgkQ+gerLs4ltQ6fMQCfcdevBmf4yA3HBnZal/8map5h
q2sAnj7acU3CjN2DACvCA2Ij213VvW/k
=w9IP
-----END PGP SIGNATURE-----



More information about the bluebream mailing list