I'm tuning the performance of some request in my application and there's something puzzling me.

Rails reports the action takes 6ms:

Started GET "/templates/2.json" for 127.0.0.1 at 2013-07-22 10:49:15 -0300
Processing by TemplatesController#index as JSON
  Parameters: {"id"=>"2"}
  Rendered text template (0.1ms)
Completed 200 OK in 6ms (Views: 0.8ms | Sequel: 2.2ms)

Chrome's "waiting" time for a local request (localhost) is 25ms.

Then nginx will report 98ms for the same request when proxying the Rails app, but that is a separate issue I'll investigate by other means...

First, I'd like to understand what is this 6ms reported time by Rails. Does it take into account the whole request time since it reaches the web server or only since it reaches the Rails stack? Does it take into account all middlewares? Any hint where those extra 19ms from Chrome's reported "waiting" time are being spent on?

Also, I'd like to take the chance to ask about another thing I've noticed recently. If I remember correctly, Rails used to fill in the Etag automatically in every request based on the response content but now it will only do that if you use something like fresh_when or stale?. Is that correct or has it always been working the way it currently does?

I understand that the overhead may not be desired, but I'd be curious if the automatic Etag header has been removed, what would be the reason for that besides the overhead?

Thanks in advance,
Rodrigo.

--
You received this message because you are subscribed to the Google Groups "Ruby on 
Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to