以下是一些示例请求完成时间:
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)
为什么总时间与Views和ActiveRecord时间的总和不同?我怎样才能减少这个差距?
解决方法
区别在于您的控制器中处理的请求部分.如果您想减少这段时间,请确保您在控制器中尽可能高效地完成工作.