Серверы Spork работают очень медленно (> 3 м) для RSpec & Cucumber BDD - PullRequest
0 голосов
/ 07 апреля 2010

Недавно я установил свежую настройку разработки на свой ноутбук и теперь заметил, что мои экземпляры spork запускаются несколько минут. Это также наиболее вероятно, что тесты RSpec и Cucumber запускаются очень медленно.

Я запустил в режиме диагностики с флагом -d и получил вывод ниже. Кто-нибудь знает, почему это происходит внезапно?

- Spork Diagnosis -
-- Summary --
config/boot.rb
config/environment.rb
config/initializers/backtrace_silencers.rb
config/initializers/devise.rb
config/initializers/hoptoad.rb
config/initializers/inflections.rb
config/initializers/mime_types.rb
config/initializers/new_rails_defaults.rb
config/initializers/session_store.rb
spec/spec_helper.rb



-- Detail --



--- config/boot.rb ---
config/environment.rb:7
/Users/Eric/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/Users/Eric/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
spec/spec_helper.rb:9
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/spork-0.8.2/bin/../lib/spork.rb:23:in `prefork'
spec/spec_helper.rb:7



--- config/environment.rb ---
spec/spec_helper.rb:9
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/spork-0.8.2/bin/../lib/spork.rb:23:in `prefork'
spec/spec_helper.rb:7



--- config/initializers/backtrace_silencers.rb ---
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:147:in `load'
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:622:in `load_application_initializers'
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:621:in `each'
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:621:in `load_application_initializers'
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:176:in `process'
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:113:in `send'
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:113:in `run_without_spork'
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/spork-0.8.2/lib/spork/app_framework/rails.rb:18:in `run'
config/environment.rb:9
/Users/Eric/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/Users/Eric/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
spec/spec_helper.rb:9
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/spork-0.8.2/bin/../lib/spork.rb:23:in `prefork'
spec/spec_helper.rb:7



--- config/initializers/devise.rb ---
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:147:in `load'
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:622:in `load_application_initializers'
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:621:in `each'
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:621:in `load_application_initializers'
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:176:in `process'
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:113:in `send'
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:113:in `run_without_spork'
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/spork-0.8.2/lib/spork/app_framework/rails.rb:18:in `run'
config/environment.rb:9
/Users/Eric/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/Users/Eric/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
spec/spec_helper.rb:9
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/spork-0.8.2/bin/../lib/spork.rb:23:in `prefork'
spec/spec_helper.rb:7



--- config/initializers/hoptoad.rb ---
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:147:in `load'
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:622:in `load_application_initializers'
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:621:in `each'
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:621:in `load_application_initializers'
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:176:in `process'
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:113:in `send'
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:113:in `run_without_spork'
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/spork-0.8.2/lib/spork/app_framework/rails.rb:18:in `run'
config/environment.rb:9
/Users/Eric/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/Users/Eric/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
spec/spec_helper.rb:9
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/spork-0.8.2/bin/../lib/spork.rb:23:in `prefork'
spec/spec_helper.rb:7



--- config/initializers/inflections.rb ---
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:147:in `load'
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:622:in `load_application_initializers'
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:621:in `each'
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:621:in `load_application_initializers'
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:176:in `process'
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:113:in `send'
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:113:in `run_without_spork'
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/spork-0.8.2/lib/spork/app_framework/rails.rb:18:in `run'
config/environment.rb:9
/Users/Eric/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/Users/Eric/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
spec/spec_helper.rb:9
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/spork-0.8.2/bin/../lib/spork.rb:23:in `prefork'
spec/spec_helper.rb:7



--- config/initializers/mime_types.rb ---
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:147:in `load'
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:622:in `load_application_initializers'
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:621:in `each'
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:621:in `load_application_initializers'
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:176:in `process'
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:113:in `send'
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:113:in `run_without_spork'
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/spork-0.8.2/lib/spork/app_framework/rails.rb:18:in `run'
config/environment.rb:9
/Users/Eric/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/Users/Eric/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
spec/spec_helper.rb:9
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/spork-0.8.2/bin/../lib/spork.rb:23:in `prefork'
spec/spec_helper.rb:7



--- config/initializers/new_rails_defaults.rb ---
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:147:in `load'
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:622:in `load_application_initializers'
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:621:in `each'
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:621:in `load_application_initializers'
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:176:in `process'
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:113:in `send'
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:113:in `run_without_spork'
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/spork-0.8.2/lib/spork/app_framework/rails.rb:18:in `run'
config/environment.rb:9
/Users/Eric/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/Users/Eric/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
spec/spec_helper.rb:9
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/spork-0.8.2/bin/../lib/spork.rb:23:in `prefork'
spec/spec_helper.rb:7



--- config/initializers/session_store.rb ---
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:147:in `load'
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:622:in `load_application_initializers'
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:621:in `each'
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:621:in `load_application_initializers'
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:176:in `process'
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:113:in `send'
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:113:in `run_without_spork'
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/spork-0.8.2/lib/spork/app_framework/rails.rb:18:in `run'
config/environment.rb:9
/Users/Eric/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/Users/Eric/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
spec/spec_helper.rb:9
/Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/spork-0.8.2/bin/../lib/spork.rb:23:in `prefork'
spec/spec_helper.rb:7



--- spec/spec_helper.rb ---

1 Ответ

0 голосов
/ 22 июня 2010

Вы можете использовать гем ruby-prof для профилирования и просмотра того, что занимает так много времени. Мое первое предположение - вам нужно установить BasicSocket.do_not_reverse_lookup = true но кто бы мог знать ...

...