Why is my Rails development environment so terribly slow? I am seeing 2-3 seconds in the log for a call, the actually time is about 10 seconds for a controller action. A good chunk of time seems to be spent on the asset pipeline.
为什么我的Rails开发环境如此缓慢?我在日志中看到2-3秒的调用,实际上控制器操作的时间大约是10秒。大量的时间似乎花在了资产管道上。
Gems like rails-dev-tweaks do not really help so far.
到目前为止,像rails- devs -微调这样的宝石并没有真正的帮助。
- My Setup:
- 我的设置:
- OS X fully updated
- OS X完全更新
- Ruby 1.9.3-p0 via rvm
- Ruby 1.9.3-p0通过区
- Rails 3.2.1
- Rails 3.2.1之上
- MySQL installed via homebrew
- MySQL安装通过自制程序
- Server POW or webrick
- 服务器战俘或webrick
log output:
日志输出:
Started GET "/" for 127.0.0.1 at 2012-02-10 13:14:34 +0000
Processing by HomeController#index as HTML
User Load (0.3ms) SELECT `users`.* FROM `users` WHERE `users`.`id` = 1 LIMIT 1
User Load (0.7ms) SELECT `users`.* FROM `users`
Account Load (0.3ms) SELECT `accounts`.* FROM `accounts` WHERE `accounts`.`id` = 1 LIMIT 1
Rendered home/index.html.erb within layouts/application (40.2ms)
Rendered shared/_navigation.html.erb (0.7ms)
Completed 200 OK in 2084ms (Views: 44.6ms | ActiveRecord: 9.6ms)
1 个解决方案
#1
2
OK, I figured out what made it slow. It was the Rails Footnotes gem that came with the app template from: http://github.com/RailsApps/rails3-devise-rspec-cucumber
好吧,我知道是什么让它变慢了。这是Rails的脚注宝石,来自http://github.com/RailsApps/rails3-devise-rspec-cucumber
I have also created an issue on github: https://github.com/RailsApps/rails3-devise-rspec-cucumber/issues/22
我还在github上创建了一个问题:https://github.com/railsapps/rails/rails3 - devis-rspec -cucumber/发行数/22
#1
2
OK, I figured out what made it slow. It was the Rails Footnotes gem that came with the app template from: http://github.com/RailsApps/rails3-devise-rspec-cucumber
好吧,我知道是什么让它变慢了。这是Rails的脚注宝石,来自http://github.com/RailsApps/rails3-devise-rspec-cucumber
I have also created an issue on github: https://github.com/RailsApps/rails3-devise-rspec-cucumber/issues/22
我还在github上创建了一个问题:https://github.com/railsapps/rails/rails3 - devis-rspec -cucumber/发行数/22