Myk Melez wrote:
> The approach I am taking is to add a method to Context.pm for sending 
> processed content to the output stream and then call that method in 
> compiled templates for each chunk of generated content rather than 
> saving it all up and sending it at the end.  I'm also adding an 
> "INCREMENTAL" configuration variable that enables this functionality 
> (disabled by default).

I think a better approach would be to add a keyword for flushing all 
generated text so far.  You could start by implemening this as a plugin.

With most web apps, you do want to save the content until the end so 
that you can be sure that nothing went wrong.  If you have a serious 
error and you already sent half the page, you're in trouble.  However, 
there are specific situations when sending just a part of the page while 
you do a slow search or something is very useful, and in those cases you 
generally know how you want to chunk up the page (e.g. send the topbar 
then wait for the rest).  An explicit keyword should be fine for this.

- Perrin



Reply via email to