[Twisted-web] making streams optional in web2
exarkun at divmod.com
Thu Feb 9 13:34:41 MST 2006
On Thu, 9 Feb 2006 15:24:37 -0500, James Y Knight <foom at fuhm.net> wrote:
>On Feb 9, 2006, at 3:08 PM, Jean-Paul Calderone wrote:
>> def app(environ, start_response):
>> start_response('200 Ok', [('Content-Type', 'text/plain')])
>> return 'WSGI is a wonderful thing.'
>There's a problem there: the return value of a wsgi resource is a sequence,
>so you're returning a sequence of single character strings, thus causing
>excessively high overhead. Perhaps that ought to be special cased, cause
>I'm sure more people than you will make that mistake.
Yes, this is true. It was accidental at first, but I intentionally left it in this form even after I realized what was going on.
Performance is roughly equivalent using either ['WSGI ...'] or other similar constructs.
More information about the Twisted-web