看着ruby mini-profiler输出,我注意到这种模式是 5-6 个局部渲染,每个渲染大约 6-7 毫秒,然后一个渲染关闭 60-70 毫秒。我想知道是什么原因造成的,它看起来像是某种潮红。所有模型数据都是在视图渲染开始时加载的,所以我知道不是延迟加载造成的。
Rendering: application/_row 7.1 +1107.0
Rendering: application/_row 68.7 +1115.0
Rendering: application/_row 6.7 +1184.0
...
Rendering: application/_row 6.5 +1234.0
Rendering: application/_row 65.2 +1241.0
Rendering: application/_row 6.6 +1306.0
...
Rendering: application/_row 6.6 +1321.0
Rendering: application/_row 66.6 +1328.0
Rendering: application/_row 6.6 +1395.0
...
Rendering: application/_row 6.6 +1444.0
Rendering: application/_row 65.4 +1451.0
Ruby 1.9.3p194,Rails 3.2.11