[Zope-dev] ZPT Optimization Opportunity

Jim Fulton jim at zope.com
Mon Sep 27 14:21:03 EDT 2004


Tres Seaver wrote:
...
>   - Returning the iterator to medusa means that the application
>     thread becomes available to service other threads that much more
>     quickly.  Even if the malloc issues can't be demonstrated, the
>     increase in concurrency *should* be a win here.

I don't think this would affect application threads.
The application thread is freed as soon as the ZPT template
completed rendering.  This will be the same whether we dribbled
data out as we go, or not.

The potential benefit is that we could get the page back to the
browser faster and thus reduce the number of open connection
that asyncore has to manage.  This benefit will be difficult
to obtain unless the publisher supports streaming outbut via
chunks. (I doubt that it does, but I don't really know.)
Without output chunking, the server can't start sending
output until the content length is known and it can't know
that until the template has been fully generated.

Jim

-- 
Jim Fulton           mailto:jim at zope.com       Python Powered!
CTO                  (540) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org


More information about the Zope-Dev mailing list