I am working on an ‘optimization’ on my application and I am trying to understand the output that rails (version 2.2.2) gives at the end of the render.
Here is the ‘old’ way:
Rendered user/_old_log (25.7ms) Completed in 466ms (View: 195, DB: 8) | 200 OK
And the ‘new’ way:
Rendered user/_new_log (48.6ms) Completed in 337ms (View: 192, DB: 33) | 200 OK
These queries were exactly the same, the difference is the old way is parsing log files while the new way is querying the database log table.
The actual speed of the page is not the issue (the user understands that this is a slow request) … but I would like the page to respond as quickly as possible even though it is a ‘slow’ page.
So, my question is, what do the numbers represent/mean? In other words, which way was the faster method and why?
This:
is the time to render just the
_old_logpartial template, and comes from an ActiveSupport::Notification getting processed by ActionView::LogSubscriberThis:
Is the http status returned, as well as the total time for the entire request. It comes from ActionController::LogSubscriber.
Also, note those parenthetical items at the end:
Those are the total times for rendering the entire view (partials & everything) and all database requests, respectively, and come from ActionController::LogSubscriber as well.