[英]Slow HTTP Load with the Assets Folder of the Project - Ruby on Rails, Webrick, Localhost, Firefox
Notice: The cache has been cleared before recording the HTTP protocol. 注意:在记录HTTP协议之前,已清除缓存。
This is a HTTP protocol of the HTTP Watch Addon for Firefox : http://www.mediafire.com/view/?wccimru3qdu19s2# 这是Firefox HTTP Watch Addon的HTTP协议 : http : //www.mediafire.com/view/? wccimru3qdu19s2#
The HTTP load is around 5 seconds
. HTTP负载约为
5 seconds
。
The status code is 200 OK
. 状态代码为
200 OK
。
To load the assets
folder into the cache
Firefox does not do the GET
request just on the first time of rendering the web application - it also does it repeatedly on every page load, so that every page rendering becomes too slow. 要将
assets
文件夹加载到cache
Firefox不会仅在第一次呈现Web应用程序时执行GET
请求-它还会在每次页面加载时重复执行该请求,因此每次页面呈现都变得太慢。
Is there something specific in Webrick, Ruby, or Rails , which may cause Firefox to do the repeated GET
request? Webrick,Ruby或Rails中是否存在某些特定内容,可能会导致Firefox重复执行
GET
请求?
The HTTP load takes around 5 seconds
on the first time rendering of the web application, so the assets
folder can be loaded in the cache
of Firefox - are there procedures to increase the load speed? 首次呈现Web应用程序时, HTTP加载大约需要
5 seconds
,因此assets
文件夹可以加载到Firefox的cache
中-是否有提高加载速度的过程?
Installing the rails-dev-tweaks
has increased the speed time from around 5 seconds
to around 2.5 seconds
. 安装
rails-dev-tweaks
可以将速度时间从大约5 seconds
增加到大约2.5 seconds
。 Where, by now, the repeated GET
request is still a persisting problem, which means that around 2.5 seconds
for each page load is still too slow. 到目前为止,重复的
GET
请求仍然是一个持续存在的问题,这意味着每个页面加载大约2.5 seconds
仍然太慢。
Add 加
rails-dev-tweaks
https://github.com/wavii/rails-dev-tweaks https://github.com/wavii/rails-dev-tweaks
to your Gemfile for 'development' environment... 到您的Gemfile中进行“开发”环境...
Currently the issue should only be in dev env., in production it should be working fine already 目前,问题仅在开发环境中,在生产中应该已经可以正常使用
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.