On 11 Ott, 20:44, ehansen486 <
ehansen...@gmail.com> wrote:
> I occasionally need to stream a large XML data file that represents
> key data in a DB. I'm porting over an application from PHP Symfony,
[...]
> This particular issue I can certainly work around but it's
> disappointing if it's true that there's no way in rails to stream
> output to the browser for large pages. And particularly disappointing
> if PHP/Symfony can outgun rails for streaming. I've been using rails
> since 2006 and most requests have fairly small responses so maybe the
> answer is to defer to a different technology for streaming larger
> files. But it seems like there should be a good solution for
> streaming data and flushing the output stream.
I'm in the same boat, Rails 2-3-stable, output.flush is said to be
deprecated and no longer works, but it seems that using render :text
=> proc { |response, output| doesn't send streamed data at all.
I also tried with send_data without luck.
After some research I thought that the flush would happen after a
output.write but that does not seem the case, at least where I looked.
We have potentially very large ajax requests (3mb) and from a java
server we were able to cut down the action time greatly by
manipulating the response; I'm trying to achieve the same from Rails
but nothing I tried currently works.