Re[2]: [ZODB-Dev] What makes the ZODB slow?

2006-06-26 Thread Adam Groszer
Hello Tim, Monday, June 26, 2006, 11:28:51 PM, you wrote: [snip] > AFAIK, nobody anywhere has used this yet, outside of Python's test > suite. It was intended to be a simple, cheap approach to cutting > pickle bloat for apps motivated enough to set up the registry. You'll > note that half the o

Re: [ZODB-Dev] What makes the ZODB slow?

2006-06-26 Thread Sidnei da Silva
On Mon, Jun 26, 2006 at 05:28:51PM -0400, Tim Peters wrote: | AFAIK, nobody anywhere has used this yet, outside of Python's test | suite. It was intended to be a simple, cheap approach to cutting | pickle bloat for apps motivated enough to set up the registry. You'll | note that half the one-byte

Re: [ZODB-Dev] What makes the ZODB slow?

2006-06-26 Thread Tim Peters
[Dieter Maurer] The newest pickle formats can also handle the class references is bit more efficiently -- at least when a single transaction modifies many objects of the same class. [Chris Withers] I know ZC was involved in the work to introduce these new pickle formats, but are they actually

Re: [ZODB-Dev] Re: getting the object ID (_p_oid attribute)

2006-06-26 Thread Florent Guillaume
On 26 Jun 2006, at 21:28, Robert Gravina wrote: def __eq__(self, other): if isinstance(other, ): if hasattr(other,"_p_oid") and other._p_oid != None and (other._p_oid == self._p_oid): return True else: return False and now ca

Re: [ZODB-Dev] Re: getting the object ID (_p_oid attribute)

2006-06-26 Thread Robert Gravina
def __eq__(self, other): if isinstance(other, ): if hasattr(other,"_p_oid") and other._p_oid != None and (other._p_oid == self._p_oid): return True else: return False and now can compare objects for equality after the (Twisted

Re: [ZODB-Dev] What makes the ZODB slow?

2006-06-26 Thread Dieter Maurer
Chris Withers wrote at 2006-6-26 14:05 +0100: >Dieter Maurer wrote: >> The newest pickle formats can also handle the class references >> is bit more efficiently -- at least when a single transaction >> modifies many objects of the same class. > >I know ZC was involved in the work to introduce these

Re: [ZODB-Dev] Re: What makes the ZODB slow?

2006-06-26 Thread Dieter Maurer
Chris Withers wrote at 2006-6-26 14:00 +0100: > ... >Ah, conflict errors, the bane of any ZODB app. Makes me wonder why other >optimistic concurrency databases (I believe PostGres is one of these?) >don't seem to exhibit the same problems... "PostGres" does use looks, lots of them and for differ

[ZODB-Dev] Re: More exciting ZODB errors ;-)

2006-06-26 Thread Dieter Maurer
Hallo Florent, Florent Guillaume wrote at 2006-6-26 00:53 +0200: >Dieter Maurer wrote: >> Chris Withers wrote at 2005-12-14 16:23 +: >>> ... >>> File "lib/python/ZODB/Connection.py", line >>> 788, in _setstate_noncurrent >>> assert end is not None >>> AssertionError >> >> This means tha

[ZODB-Dev] Re: getting the object ID (_p_oid attribute)

2006-06-26 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Robert Gravina wrote: > > On 2006/06/27, at 3:49, Benji York wrote: > >> Robert Gravina wrote: >>> I just tried loading a persisted object interactively and noticed >>> that although the _p_oid doesn't print out as anything (and hence I >>> always

Re: [ZODB-Dev] Re: getting the object ID (_p_oid attribute)

2006-06-26 Thread Gary Poster
On Jun 26, 2006, at 3:16 PM, Florent Guillaume wrote: On 26 Jun 2006, at 21:11, Robert Gravina wrote: On 2006/06/27, at 3:49, Benji York wrote: Robert Gravina wrote: I just tried loading a persisted object interactively and noticed that although the _p_oid doesn't print out as anything

Re: [ZODB-Dev] Re: getting the object ID (_p_oid attribute)

2006-06-26 Thread Gary Poster
On Jun 26, 2006, at 3:11 PM, Robert Gravina wrote: I seemed to have solved this problem. I was able to write a __eq__ function like this: def __eq__(self, other): if isinstance(other, ): if hasattr(other,"_p_oid") and other._p_oid != None and (other._p_oid == self._

Re: [ZODB-Dev] Re: getting the object ID (_p_oid attribute)

2006-06-26 Thread Florent Guillaume
On 26 Jun 2006, at 21:11, Robert Gravina wrote: On 2006/06/27, at 3:49, Benji York wrote: Robert Gravina wrote: I just tried loading a persisted object interactively and noticed that although the _p_oid doesn't print out as anything (and hence I always thought it was empty in my debugging

Re: [ZODB-Dev] Re: getting the object ID (_p_oid attribute)

2006-06-26 Thread Robert Gravina
On 2006/06/27, at 3:49, Benji York wrote: Robert Gravina wrote: I just tried loading a persisted object interactively and noticed that although the _p_oid doesn't print out as anything (and hence I always thought it was empty in my debugging prints), it isn't actually None! Can anyone

Re: [ZODB-Dev] Re: getting the object ID (_p_oid attribute)

2006-06-26 Thread Benji York
Robert Gravina wrote: I just tried loading a persisted object interactively and noticed that although the _p_oid doesn't print out as anything (and hence I always thought it was empty in my debugging prints), it isn't actually None! Can anyone explain this? (here "p" is my persisted object

[ZODB-Dev] Re: getting the object ID (_p_oid attribute)

2006-06-26 Thread Robert Gravina
On 2006/06/27, at 3:16, Florent Guillaume wrote: Robert Gravina wrote: I've been having trouble getting the object ID of persisted objects in the ZODB. I have read that the _p_oid attribute is supposed to contain this, but when I access persisted objects from a filestore and check this va

[ZODB-Dev] Re: getting the object ID (_p_oid attribute)

2006-06-26 Thread Florent Guillaume
Robert Gravina wrote: I've been having trouble getting the object ID of persisted objects in the ZODB. I have read that the _p_oid attribute is supposed to contain this, but when I access persisted objects from a filestore and check this value it always seems to be None. Also, is there any wa

[ZODB-Dev] getting the object ID (_p_oid attribute)

2006-06-26 Thread Robert Gravina
I've been having trouble getting the object ID of persisted objects in the ZODB. I have read that the _p_oid attribute is supposed to contain this, but when I access persisted objects from a filestore and check this value it always seems to be None. Also, is there any way to get an object I

[ZODB-Dev] Re: What makes the ZODB slow?

2006-06-26 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chris Withers wrote: > Florent Guillaume wrote: >> >> BTrees perform best when keys' prefixes are randomly distributed. >> So if your application generates keys like 'foo001', 'foo002',... >> you'll get lots of conflicts. Same for consecutive integers

[ZODB-Dev] Re: What makes the ZODB slow?

2006-06-26 Thread Florent Guillaume
Chris Withers wrote: Florent Guillaume wrote: I can comment, I have a big brain too: the code in the catalog uses per-connection series of keys, so no conflicts arise. Really? I thought they were per-thread... wasn't aware that each thread was tied to one connection indefinitely... I thought

Re: [ZODB-Dev] Re: What makes the ZODB slow?

2006-06-26 Thread Chris Withers
Florent Guillaume wrote: I can comment, I have a big brain too: the code in the catalog uses per-connection series of keys, so no conflicts arise. Really? I thought they were per-thread... wasn't aware that each thread was tied to one connection indefinitely... I thought the connections were

Re: [ZODB-Dev] Re: What makes the ZODB slow?

2006-06-26 Thread Chris Withers
Andreas Jung wrote: BTrees perform best when keys' prefixes are randomly distributed. So if your application generates keys like 'foo001', 'foo002',... you'll get lots of conflicts. Same for consecutive integers in IOBTree. Tempted to call bullshit on this, since there's code in the catalog t

Re: [ZODB-Dev] Re: More exciting ZODB errors ;-)

2006-06-26 Thread Florent Guillaume
On 26 Jun 2006, at 15:12, Chris Withers wrote: Florent Guillaume wrote: This patch didn't seem to cure our Zope 2.8 afflicted with the "assert end is not None" problem. Florent, Have you actually seen any problems from these errors? I still see them occasionally, but they never seem to have

Re: [ZODB-Dev] Re: What makes the ZODB slow?

2006-06-26 Thread Florent Guillaume
On 26 Jun 2006, at 15:02, Chris Withers wrote: Florent Guillaume wrote: BTrees perform best when keys' prefixes are randomly distributed. So if your application generates keys like 'foo001', 'foo002',... you'll get lots of conflicts. Same for consecutive integers in IOBTree. Tempted to cal

Re: [ZODB-Dev] Re: What makes the ZODB slow?

2006-06-26 Thread Andreas Jung
--On 26. Juni 2006 14:02:20 +0100 Chris Withers <[EMAIL PROTECTED]> wrote: Florent Guillaume wrote: BTrees perform best when keys' prefixes are randomly distributed. So if your application generates keys like 'foo001', 'foo002',... you'll get lots of conflicts. Same for consecutive integer

Re: [ZODB-Dev] Re: What makes the ZODB slow?

2006-06-26 Thread Chris Withers
Florent Guillaume wrote: BTrees perform best when keys' prefixes are randomly distributed. So if your application generates keys like 'foo001', 'foo002',... you'll get lots of conflicts. Same for consecutive integers in IOBTree. Tempted to call bullshit on this, since there's code in the cata

Re: [ZODB-Dev] What makes the ZODB slow?

2006-06-26 Thread Chris Withers
Dieter Maurer wrote: The newest pickle formats can also handle the class references is bit more efficiently -- at least when a single transaction modifies many objects of the same class. I know ZC was involved in the work to introduce these new pickle formats, but are they actually used in ZOD

Re: [ZODB-Dev] Re: What makes the ZODB slow?

2006-06-26 Thread Chris Withers
Jean Jordaan wrote: The ZODB is actually very fast. [...] So you're probably observing slowness in the frameworks on top of it. I'll believe this anytime :-] ;-) In our case, a transaction may be a workflow state change on say 50 objects. Two or three people try a transaction like that wit

Re: [ZODB-Dev] Re: More exciting ZODB errors ;-)

2006-06-26 Thread Chris Withers
Florent Guillaume wrote: This patch didn't seem to cure our Zope 2.8 afflicted with the "assert end is not None" problem. Florent, Have you actually seen any problems from these errors? I still see them occasionally, but they never seem to have any ill effects, other than leaving me feeling