OK.  That means that the response doesnt contain that read file code. I'll
think about it. Btw, I am quite slow in this kind of thing. I am not really
a programmer. Just a math lecturer with a hobby. Hopefully I'll find a way
to improve it as suggested.


On Tue, Oct 11, 2011 at 3:05 AM, Michael Merickel <mmeri...@gmail.com>wrote:

> Your solution actually isn't any more efficient than what you had before,
> so I'd expect you'd see a similar performance issue.
>
> The point of X-Accel-Redirect is that you do not have to open the file and
> read it in Python. Your view should return a simple Response object with no
> body, and just the appropriate headers (possibly content-type, as well as
> status_code). nginx will see that header and add the body to the response
> for you outside of Python, leaving your app free to service other requests
> while nginx handles the file I/O.
>
> If you're able to make these improvements and it works, I'd like to add
> this to the Pyramid cookbook. So hopefully either you can issue a pull
> request to the cookbook or just paste your changes here and I'll write it
> up. :-)
>
> --
>
> Michael
>
> --
> You received this message because you are subscribed to the Google Groups
> "pylons-discuss" group.
> To post to this group, send email to pylons-discuss@googlegroups.com.
> To unsubscribe from this group, send email to
> pylons-discuss+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/pylons-discuss?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to