【发布时间】:2012-03-19 14:19:47
【问题描述】:
我目前正在使用 jruby-1.6.6 和 rails 3.2。
我正在使用gem 'bootstrap-sass', '~> 2.0.1' 将 twitter bootstrap 导入为 scss。
但是在开发模式下,我通过jruby -S rails s启动应用程序,每次在scss中稍作更改,并触发刷新页面,编译application.css.scss需要很长时间,其中我导入所有其他 scss 文件。
jruby-1.6.6 和 jruby-1.6.7 所花费的时间
Started GET "/playground/dashboard" for 0:0:0:0:0:0:0:1%0 at 2012-02-29 12:30:18 +0800
Processing by PlaygroundController#index as HTML
Parameters: {"partial"=>"dashboard"}
Rendered playground/_dashboard.erb (1.0ms)
Rendered playground/show.html.erb within layouts/application (2.0ms)
Compiled application.css (11540ms) (pid 5518)
Completed 200 OK in 11660ms (Views: 11660.0ms)
MRI ruby-1.9.2-p290 花费的时间
Started GET "/playground/dashboard" for 127.0.0.1 at 2012-02-29 12:32:53 +0800
Processing by PlaygroundController#index as HTML
Parameters: {"partial"=>"dashboard"}
Rendered playground/_dashboard.erb (0.0ms)
Rendered playground/show.html.erb within layouts/application (0.5ms)
Compiled application.css (1283ms) (pid 5674)
Completed 200 OK in 1323ms (Views: 1323.1ms)
有什么办法可以调整吗?
【问题讨论】:
-
可能有点晚了,但我正在研究生产编译的性能问题。我没有将 gem 与 JRuby 一起使用,所以我无法对此发表评论。
-
感谢您的评论,但我的问题是在开发模式下,当我需要更改 scss 并经常刷新页面以查看更改时,jruby 速度非常慢,您知道如何解决这个问题?
标签: ruby-on-rails-3 performance jruby jrubyonrails sass