Request completion time greater than sum of ActiveRecord and View times
ruby-on-rails, time
Solution
The difference is in the part of the request that is processed in your controller. If you want to reduce this time, just make sure you're doing things as efficiently as possible in the controller.
Problem
Here are some sample request completion times: ``` Completed 200 OK in 1054ms (Views: 10.8ms | ActiveRecord: 455.6ms) Completed 200 OK in 1410ms (Views: 11.6ms | ActiveRecord: 764.3ms) Completed 200 OK in 1403ms (Views: 11.0ms | ActiveRecord: 776.1ms) Completed 200 OK in 1068ms (Views: 12.1ms | ActiveRecord: 438.6ms) Completed 200 OK in 854ms (Views: 10.9ms | ActiveRecord: 306.8ms) ``` Why is the total time different from the sum of Views and ActiveRecord times? How can I reduce this gap?