请求完成时间大于 ActiveRecord 和 View 时间的总和 [英] Request completion time greater than sum of ActiveRecord and View times

查看:28
本文介绍了请求完成时间大于 ActiveRecord 和 View 时间的总和的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下是一些示例请求完成时间:

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)

为什么总时间与 Views 和 ActiveRecord 时间的总和不同?我怎样才能缩小这个差距?

Why is the total time different from the sum of Views and ActiveRecord times? How can I reduce this gap?

推荐答案

区别在于在控制器中处理的请求部分.如果您想减少此时间,只需确保您在控制器中尽可能高效地执行操作.

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.

这篇关于请求完成时间大于 ActiveRecord 和 View 时间的总和的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆