Ivo van der Wijk writes:
 > On Wed, Apr 17, 2002 at 07:54:04AM -0400, Paul Everitt wrote:
 > > Let's take the next step and say that you can live with a little 
 > > volatility in the data.  You write an object that caches ten seconds 
 > > worth of writes.  Whenever a write comes in at the over-ten-second mark, 
 > > you write the _v_ attribute to the persistent attribute.  There's an 
 > > order of magnitude improvement.
 > This sounds like a good solution. Actually, I only have to write to the
 > persited attribute if the object is persisted itself (i.e. in setstate),
 > until then, I'll just add the self._counter and self._v_counter, right?
I would expect, you lose lots of counts with this approach (at least,
if you are not careful):

   Each connection has its own "_v_counter" copy which count
   independent from one another. If one of the parent objects
   is written, the copies of it in the other connections
   are invalidated and later reloaded from the ZODB.
   I expect the original "_v_counter" values are lost.


Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to