<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On May 9, 2010, at 11:16 PM, Paul Goins wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Menlo; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="font-family: monospace; ">Question: Is there a performance related reason why Twisted core does&nbsp;not use inlineCallbacks?<br></span></span></blockquote></div><br><div>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.</div><div><br></div><div>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. &nbsp;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.</div><div><br></div></body></html>