Re: [Twisted-Python] Deferred documentation.

2011-03-30 Thread Tristan Seligmann
On Tue, Mar 29, 2011 at 5:08 PM, Christopher Armstrong wrote: > I probably use addCallbacks once for every 30-100 addCallback or addErrback > calls I do (counted by lines of code, not times they're executed). But > that's just an off-the-cuff estimate. For interest's sake, I just ran the numbers

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-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: […] > 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] Deferred documentation.

2011-03-30 Thread Christopher Armstrong
On Wed, Mar 30, 2011 at 2:55 AM, Tristan Seligmann wrote: > On Tue, Mar 29, 2011 at 5:08 PM, Christopher Armstrong > wrote: > > I probably use addCallbacks once for every 30-100 addCallback or > addErrback > > calls I do (counted by lines of code, not times they're executed). But > > that's just

Re: [Twisted-Python] Deferred documentation.

2011-03-30 Thread Jasper St. Pierre
The problem that I have is that errback flow is awkward... the main difference is that addCallbacks will call the errback if its own callback fails, right? I can only see that really being useful by accident. On Wed, Mar 30, 2011 at 11:09 AM, Christopher Armstrong < ra...@twistedmatrix.com> wrote:

Re: [Twisted-Python] Deferred documentation.

2011-03-30 Thread Jonathan Lange
On Wed, Mar 30, 2011 at 4:50 PM, Jasper St. Pierre wrote: > The problem that I have is that errback flow is awkward... the main > difference is that addCallbacks will call the errback if its own callback > fails, right? I can only see that really being useful by accident. > Not really. # 1. Hand

Re: [Twisted-Python] Deferred documentation.

2011-03-30 Thread Glyph Lefkowitz
On Mar 30, 2011, at 11:09 AM, Christopher Armstrong wrote: > Funny, that's what I got on my proprietary application (0.0597) :-) It's a > heavily inlineCallbacks-based codebase, and I expect there would be a much > larger number of addCallback/addErrback calls if it weren't. Also, looking at >

Re: [Twisted-Python] prerelease preview predocumentation

2011-03-30 Thread Glyph Lefkowitz
On Mar 29, 2011, at 3:10 AM, Albert Brandl wrote: > On Mon, Mar 28, 2011 at 09:27:04AM -0400, Tom Davis wrote: >> >> It's great to have everything indexed on one page with easy drill-down >> into specific sections. It becomes really obvious where the hierarchy >> can be optimized and how we ca

Re: [Twisted-Python] prerelease preview predocumentation

2011-03-30 Thread Kevin Horn
On Wed, Mar 30, 2011 at 12:38 PM, Glyph Lefkowitz wrote: > > On Mar 29, 2011, at 3:10 AM, Albert Brandl wrote: > > On Mon, Mar 28, 2011 at 09:27:04AM -0400, Tom Davis wrote: > > > It's great to have everything indexed on one page with easy drill-down > > into specific sections. It becomes really o

Re: [Twisted-Python] Deferred documentation.

2011-03-30 Thread Tristan Seligmann
On Wed, Mar 30, 2011 at 7:20 PM, Glyph Lefkowitz wrote: > However, in my experience, a novice's understanding of addCallbacks() is > critically important to understanding other uses of Deferred as well; in > particular, the "one chain of pairs of callback and errback" concept makes a > lot of the

[Twisted-Python] Announcing Twisted 11.0.0pre2!

2011-03-30 Thread Jessica McKellar
Having done the builds with two curious guinea pigs by my side, we are triply pleased to announce the second 11.0.0 pre-release. Tarballs for the second pre-release are available at: The main differences between this release and the first pre-rele

Re: [Twisted-Python] prerelease preview predocumentation

2011-03-30 Thread Glyph Lefkowitz
On Mar 30, 2011, at 2:09 PM, Kevin Horn wrote: > Er, you mean it should _not_ stop the migration from happening? Uh, yes, it should not stop the migration from happening. Sorry for the mix-up. Actually we are on track to have the final migration happen very soon, if someone goes through the

Re: [Twisted-Python] Deferred documentation.

2011-03-30 Thread Glyph Lefkowitz
On Mar 30, 2011, at 2:51 PM, Tristan Seligmann wrote: > On Wed, Mar 30, 2011 at 7:20 PM, Glyph Lefkowitz > wrote: >> However, in my experience, a novice's understanding of addCallbacks() is >> critically important to understanding other uses of Deferred as well; in >> particular, the "one chain

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
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