Re: [Twisted-Python] Failure is O(state) vs Exception

2011-03-30 Thread Andrew Bennetts
Glyph Lefkowitz wrote: […] > Agreed. I've seen this behavior crop up shocking close to the top of profiles > for Calendar Server as well, so I'm very glad to hear you've undertaken this > work. The current default is almost certainly wrong; the only code which has > practically ever used it was t

Re: [Twisted-Python] Failure is O(state) vs Exception

2011-03-30 Thread Glyph Lefkowitz
On Mar 30, 2011, at 5:14 AM, Andrew Bennetts wrote: > John Arbash Meinel wrote: > […] >> I think walking the frames and copying the dicts is also expensive. That >> is what the bug you linked to me was about. (First, walking everything >> and using __dict__.copy() was a bit expensive, and second

Re: [Twisted-Python] Failure is O(state) vs Exception

2011-03-30 Thread Andrew Bennetts
John Arbash Meinel wrote: […] > I think walking the frames and copying the dicts is also expensive. That > is what the bug you linked to me was about. (First, walking everything > and using __dict__.copy() was a bit expensive, and second that the > safe_repr() calls were turning 1GB strings into a

Re: [Twisted-Python] Failure is O(state) vs Exception

2011-03-30 Thread John Arbash Meinel
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/30/2011 10:39 AM, Andrew Bennetts wrote: > John Arbash Meinel wrote: > […] >>> Just for the record, changing cleanFailure to not do its operation is >>> likely to lead to big memory leaks. The second thing you did, setting >>> self.tb to None, ma

Re: [Twisted-Python] Failure is O(state) vs Exception

2011-03-30 Thread Andrew Bennetts
John Arbash Meinel wrote: […] > > Just for the record, changing cleanFailure to not do its operation is > > likely to lead to big memory leaks. The second thing you did, setting > > self.tb to None, makes more sense to speed things up. > > Right. I agree that it is a better solution. I was wonderi

Re: [Twisted-Python] Failure is O(state) vs Exception

2011-03-28 Thread John Arbash Meinel
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/28/2011 05:02 PM, Christopher Armstrong wrote: > On Mon, Mar 28, 2011 at 9:44 AM, John Arbash Meinel > mailto:j...@arbash-meinel.com>> wrote: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > I'm doing some performance testing

Re: [Twisted-Python] Failure is O(state) vs Exception

2011-03-28 Thread Christopher Armstrong
On Mon, Mar 28, 2011 at 9:44 AM, John Arbash Meinel wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > I'm doing some performance testing of one of our Twisted applications. > And what I came across was a surprising amount of time being spent in > twisted.python.failure.Failure.__getstat

[Twisted-Python] Failure is O(state) vs Exception

2011-03-28 Thread John Arbash Meinel
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I'm doing some performance testing of one of our Twisted applications. And what I came across was a surprising amount of time being spent in twisted.python.failure.Failure.__getstate__ We're doing a fair amount with exceptions. And under cProfile, I f