I don't quite follow "how to stream HTML out"...
I found with CherryPy I can set the streamResponse flag in the CherryPy config, and then yield bits of HTML fragment. So I can yield the start of the page, and then each line of an HTML table one by one, and then the footer. If the table has hundreds of rows and a fair amount of HTML for each this row this works nicely since the user gets a response quickly (and can cancel if it is not what they wanted), and the full HTML document only exist in the users desktop. So if they do a silly query only their desktop machine gets 500MB of HTML in RAM. If there's a reasonable delay in getting each row from the model then streaming helps as well, since the user can start reading.
One of my other applications solved this problem by instead just cutting the table short after 10 lines and giving web search engine style backwards/forwards/jump to page N buttons. But that's more complexity in the server than I'd like, and sometimes the user might want a 1000 row HTML table. One of my users habitually requests a million line table, so he can save it to disk and search it :)
Dickon
