[prev in list] [next in list] [prev in thread] [next in thread]
List: zodb-dev
Subject: Re: [ZODB-Dev] [Enhancement Proposal] Garanteed lifetime for volatile
From: "Dieter Maurer" <dieter () handshake ! de>
Date: 2006-10-11 17:34:41
Message-ID: 17709.11057.1780.456068 () gargle ! gargle ! HOWL
[Download RAW message or body]
Jim Fulton wrote at 2006-10-9 15:04 -0400:
> ...
>> To make cache garbage collection as fast as possible,
>> I have proposed to actually store the sticky information in the
>> C object structure.
>
>I don't like the idea of adding that overhead to every
>persistent object just for this use case. OTOH, we only
>need a bit and I think we had a few spare bits. So maybe
>this wouldn't require any new space.
That's how I implemented it in our local Zope copy.
#define cPersistent_HEAD \
PyObject_HEAD \
PyObject *jar; \
PyObject *oid; \
PerCache *cache; \
CPersistentRing ring; \
char serial[8]; \
signed char state; \
/* DM 2005-08-22: sticky support */ \
/* unsigned char reserved[3]; */ \
unsigned char sticky; /* we need only a bit; but byte access is cheaper */\
unsigned char reserved[2];
As you can see, I used one of the three reserved "char"s -- and did not
increase the size of persistent objects.
--
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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic