W3C home > Mailing lists > Public > www-jigsaw@w3.org > July to August 1996

Re:HtmlGenerator will improve in next version?

From: Anselm Baird-Smith <abaird@w3.org>
Date: Thu, 22 Aug 1996 22:02:09 +0500
Message-Id: <9608230202.AA02212@www18.w3.org>
To: alex@access.com.au (Alexandre Rafalovitch)
Cc: www-jigsaw@w3.org
Alexandre Rafalovitch writes:
 > > BTW if anyone looks more
 > >closely into this (eg writes code), then be sure to make your
 > >generator emit code as soon as possible: one of the trouble with the
 > >current HtmlGenerator is that it will require you to internally
 > >generate *all* the document before you can actually send something. If
 > >the generated doc is to be huge, this is likely to be a real
 > >problem. (it should be friendly to Piped*Stream for example)
 > 
 > Can you elaborate on this early emit issue. The way I saw it should be,was
 > actually to keep from emitting code for as long as possible, so all filters
 > would have a chance to have a go at it. Or do you mean later stage???
 > If the explanation is long, it might even deserve a separate thread. (eg.
 > Timing issues in Jigsaw :-} )

Jigsaw core, will startemiting the reply stream as soon as it gets
it. For example, when you run a CGI script, what really happens is the
following

(client) (jigsaw core) (pump) (cgi)

As soon as the CGI process is started, the "pump" is put in place and
reads data from the script that it feeds back to the corem which in
turn sends it to the client. This allows CGI script output  to be
visible by the client before the cgi script has ended. 

The current HtmlGenerator would first build a big Byte stream of the
html, and give this stream to the core, while what you really want is
to be able to start emiting the generated html as soon as possible (so
that the clients sees it). To do this you can use a pump similar to
the one use in CGI scripts, namely PipedIO streams. This doesn affect
the remaining filters in the chian since they will act as another
(passive) pump.

Hope this helps, it might not ;-)
Anselm.
Received on Thursday, 22 August 1996 22:02:16 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 9 April 2012 12:13:25 GMT