[Zope] When does http reponse begin to be sent.

Sam Gendler sgendler@impossible.com
Sun, 23 Jan 2000 20:09:16 -0800


Is this true?  The impression I have is that the page is entirely rendered before it is sent.  To test it, I created a
dtml-method that makes changes to many entries in a SQL table, and writes a few bytes to the page for each entry.  It may take
as many as 30 seconds before the page starts to be sent back, and then it arrives awfully quickly.  Not to mention that all
pages have an accurate content-length, which would imply that the page was rendered before even the HTTP headers are sent back.

It is an unfortunate aspect of human psychology that it feels much slower to wait for a long time and then receive quickly,
than it does to just receive the document a little slower, but with less initial latency.  In fact, HTTP/1.1 chunking provides
a solution to the problem.  With chunking, it is no longer necessary to compute the content-length of an object, even if you
want to do a persistent connection.  You can just send chunks, each of which is a known size, with a zero-length chunk at the
end.  I have no idea if Zope/Medusa support this, but it should.  Recent versions of IE already support chunking, and maybe
even Netscape does as well, these days.  I haven't checked in many months (nearly a year, now).


--sam

Stephen Pitts wrote:

> On Sat, Jan 22, 2000 at 06:54:55PM -0600, Jim Sanford wrote:
> > Does Zope wait until it completely renders a page before sending it back to the client or does it send as it is rendering?
> >
>
> The latter. Also, each page gets its own transaction, and if any errors
> occur while a page "runs", whatever changes the page makes to the
> database are rolled back and an error message is shown.
> --
> Stephen Pitts
> smpitts@midsouth.rr.com
> webmaster - http://www.mschess.org
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )