Jim Fulton wrote at 2006-10-9 13:22 -0400:
> ...
>Hm, I don't why the use cases imply setting it only at the class
>level, but OK.  I'll just take that as a given. So, since _p_sticky
>is set at the class level, why store it on the instances?

Use case 2, set on class level;
use case 3, set on instance level.


To make cache garbage collection as fast as possible,
I have proposed to actually store the sticky information in the
C object structure. In the garbage collection loop,
this gives an "if (...obj->p_sticky...)" instead
of

   isSticky = PyObject_GetAttr(obj, _p_sticky_name)
   if (...isSticky...) {....}

   Py_XDECREF(isSticky)

This part of the proposal (storing "_p_sticky" in the the
C header of persistent objects) is not essentail.


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

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

Reply via email to