On May 9, 2010, at 11:16 PM, Paul Goins wrote:

> Question: Is there a performance related reason why Twisted core does not use 
> inlineCallbacks?

Twisted itself (all parts of Twisted, not just Twisted core) does not use 
inlineCallbacks because it requires syntax only available Python 2.5, and 
Twisted still supports Python 2.4.

inlineCallbacks does have some overhead, but in the contexts where it's most 
helpful (sequential tasks where you want to have limited parallelism and lots 
of asynchronous things happening) that *should* be negligible compared to 
regular Deferreds.  The place it really starts to bite you is if you just make 
every method @inlineCallbacks; in that case, not only are you spending a lot of 
extra time in Deferred methods, you're probably sequentializing a lot of 
potentially concurrent I/O.

_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to