PS.  On average each request is about 3000ms to 5000ms when being
served by RoR (authlogic/paperclip), as opposed to about 160ms for the
same content but put directly under /public.  I'm using mongrel.

On Dec 16, 4:22 pm, greghauptmann <[email protected]> wrote:
> Hi,
>
> I'm serving files (text, images) to a browser via my Rails application
> as the user needs to be authenticated too. The files are on file
> system, however references are in the database, as I'm using
> PAPERCLIP. Using AUTHLOGIC for authentication. I'm finding the
> response times aren't good, as each request for HTML/image etc have to
> go through the Rails layers I guess of AUTHLOGIC, PAPERCLIP then
> stream back.
>
> QUESTION: Given I want users to authenticate for HTML & associated
> files (CSS, images) then page needs, is there any obvious way to get
> an order of magnitude improvement? E.G.
>
> a) I guess I could save in session state the list of children files a
> HTML page needs & get its file location path, until the subsequent
> requests come, and that would some a database lookup (at the expense
> of using session state)?
>
> b) is there a way to keep open a TCP session or something for the
> entire web-page load? (clutching at straws here)
>
> c) any way to stream all html & images/css as one file/stream to
> browser?  (I assume not as this isn't how the browser works)
>
> d) Combine Javascript into one file (I've heard of this one and can
> follow up)
>
> e) Set future expiry headers on files (I've heard of this one and can
> follow up)
>
> Thanks

--

You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.


Reply via email to