在我的html,我有這個部分,我想渲染X1000:asset_path/IMAGE_PATH緩慢
<div data-image-url="<%= image_path("placeholders/#{object.placeholder_name}") %>"></div>
而且結果是緩慢的,5和每個視圖呈現40毫秒之間,所以>爲全面15S頁:
...
Rendered default_services/_default_service.html.erb (15.6ms)
Rendered default_services/_default_service.html.erb (7.0ms)
Rendered default_services/_default_service.html.erb (5.9ms)
Rendered default_services/_default_service.html.erb (7.2ms)
Rendered default_services/_default_service.html.erb (8.7ms)
Rendered default_services/_default_service.html.erb (6.0ms)
Rendered default_services/_default_service.html.erb (10.3ms)
Rendered default_services/_default_service.html.erb (9.4ms)
Rendered default_services/_default_service.html.erb (5.7ms)
Rendered default_services/_default_service.html.erb (5.4ms)
Rendered default_services/_default_service.html.erb (38.5ms)
Rendered default_services/_default_service.html.erb (9.0ms)
Rendered default_services/_default_service.html.erb (9.8ms)
Rendered default_services/_default_service.html.erb (6.8ms)
Rendered default_services/_default_service.html.erb (5.7ms)
Rendered default_services/_default_service.html.erb (7.9ms)
Rendered default_services/_default_service.html.erb (8.0ms)
Rendered default_services/_default_service.html.erb (6.0ms)
Rendered default_services/_default_service.html.erb (5.6ms)
...
(當我註釋掉 'IMAGE_PATH',它是0.1或0.2ms的每個視圖的渲染)
=>是否有可能使 「IMAGE_PATH」 更快,(不同的是使用高速緩存) ?
(我到底緩存整個事情的話,總1000X渲染< 10毫秒,但仍然不知道)