Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Request completion time greater than sum of ActiveRecord and View times

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?

like image 781
Dabidi Avatar asked Apr 11 '12 09:04

Dabidi


1 Answers

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.

like image 184
tsherif Avatar answered Nov 14 '22 20:11

tsherif