[Zope] Time-consuming External method blocks Zope execution

albert boulanger aboulang@ldeo.columbia.edu
Fri, 15 Jun 2001 17:42:35 -0400 (EDT)


Make sure you are not confusing the problem of just flusing a buffer's
worth of html vs replacing some mutipart mime document with
another. For example note the use of flush to pump stuff to the
browser in this TCL cgi example:

#!/local/bin/tclsh
puts "Content-type: text/html\n";
puts "<HTML>";
puts "<HEAD>";
puts "<TITLE>Pipleine Monitoring for Seismic Modeling</TITLE>"; 
puts "</HEAD>";
puts "<H1>Pipleine Monitoring for Seismic Modeling</H1>"; 
puts "<HR>";
puts "<P>";

for {set i 0} {$i <= 100} {incr i} {
    puts "Hi there<br>";
    puts "<SCRIPT LANGUAGE=\"JavaScript\">";
    puts "<!-- Hide from stupid browsers -->";
    puts "self.scroll(1,10000000)";
    puts "//-->";
    puts "</SCRIPT>";
    flush stdout;
    after 1000;
    }

This will cause the browser to scoll to the end or an ongoing list
being dumped to the browser.

(Sorry, but this was a ready example. I know tcl is ugly ;-) ).


FYI,
Albert Boulanger
aboulanger@vpatch.com