Hi, I'm trying to download 500MB of data (3M records) and would like to flush the output buffer every 1K records so that the browser (or web server) does not time out. With a plain Mason application calling $m->flush_buffer does the trick, but this does not seem to be working in Jifty 1.10518.
Do I have to do something else in Jifty to get it to flush the output midstream? Regards, Henry -- Henry Baragar Instantiated Software ps. Here is my template file: <%args> $csv </%args> <%init> Jifty->web->response->content_type('text/csv'); $m->clear_buffer; my @field = @{$csv->{fields}}; my $formatter = Text::xSV->new(); $m->print($formatter->format_row(@{$csv->{headers}})); my $count = 1; while (my $transaction = $csv->next) { $m->print($formatter->format_row(map {$transaction->$_} @field)); if (0 == $count++ % 1000) { $m->flush_buffer; Jifty->handler->buffer->flush_output; } } </%init> <%once> use Text::xSV; </%once>
_______________________________________________ jifty-devel mailing list jifty-devel@lists.jifty.org http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel