[英]Slow assets ruby 1.9.3, macos, rails 3.2
Im have a really weird issue, my assets served really slow in development(10 sec per file), thia happens only in Chrome(17.0.963.79). 我有一个非常奇怪的问题,我的资产在开发中的速度非常慢(每个文件10秒),而这只发生在Chrome(17.0.963.79)中。 In Firefox all works just fine.
在Firefox中一切正常。 My setup:
我的设置:
webrick
to mongrel
and thin
, using rails-dev-tweaks gem
, set cache classes to true and false. rails-dev-tweaks gem
从webrick
切换到mongrel
和thin
,将缓存类设置为true和false。 All this didnt help, im stuck why it's work slow only in chrome and not in firefox? UPD. UPD。 If this initial request(eg from new tab) all goes smooth.
如果这个初始请求(例如来自新标签)都顺利进行。 Request take near 2 minute only if im refreshing page.
如果我正在刷新页面请求接近2分钟。 I just can't wrap my head around this issue :(
我只是无法绕过这个问题:(
This seems to have something to do with name resolution. 这似乎与名称解析有关。
Using (chrome) and 使用(chrome)和
This is unfortunate for me, as I have an alias set up in /etc/hosts to point to 127.0.0.1 that affects how the page gets displayed. 这对我来说很不幸,因为我在/ etc / hosts中设置了一个别名,指向127.0.0.1,它会影响页面的显示方式。 So no testing of that in chrome.
所以没有测试铬。
I had the same problem. 我有同样的问题。 Try setting
config.assets.debug = false
in development.rb
. 尝试在
development.rb
设置config.assets.debug = false
。 It helped in my case. 它对我的情况有帮助。
We ran into this issue and solved it through using a pow server since it resolves to port 80. 我们遇到了这个问题并通过使用pow服务器解决了它,因为它解析为端口80。
curl get.pow.cx | sh
Here is a link to the source for the paranoid. 这是偏执狂来源的链接 。
Hope that helps. 希望有所帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.