On 3/17/06, Dickon Reed <[EMAIL PROTECTED]> wrote:
> > 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 :)
Wow, I was beginning to wonder if I'd ever see a real-world use-case
to justify the decision to make everything in Kid streamable :) Not
sure this outweighs all of the benefits a whole-document-in-memory
approach would bring but I feel like less of a dolt.
Appreciate all the feedback, Dickon.
--
Ryan Tomayko
[EMAIL PROTECTED]
http://naeblis.cx/rtomayko/
http://lesscode.org/
N�HS^�隊X���'���u��<�ڂ�.���y�"��*m�x%jx.j���^�קvƩ�X�jب�ȧ��m�ݚ�����v&��קv�^�+����j�Z����{az����^��h���n���)��{h�����ا��+h�(m�����Z��jY�w��ǥrg