2010-04-07 4 views
0

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

Я работал в диагностическом режиме с флагом -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/[email protected]/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/[email protected]/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/[email protected]/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:147:in `load' 
/Users/Eric/.rvm/gems/[email protected]/gems/rails-2.3.5/lib/initializer.rb:622:in `load_application_initializers' 
/Users/Eric/.rvm/gems/[email protected]/gems/rails-2.3.5/lib/initializer.rb:621:in `each' 
/Users/Eric/.rvm/gems/[email protected]/gems/rails-2.3.5/lib/initializer.rb:621:in `load_application_initializers' 
/Users/Eric/.rvm/gems/[email protected]/gems/rails-2.3.5/lib/initializer.rb:176:in `process' 
/Users/Eric/.rvm/gems/[email protected]/gems/rails-2.3.5/lib/initializer.rb:113:in `send' 
/Users/Eric/.rvm/gems/[email protected]/gems/rails-2.3.5/lib/initializer.rb:113:in `run_without_spork' 
/Users/Eric/.rvm/gems/[email protected]/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/[email protected]/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/[email protected]/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:147:in `load' 
/Users/Eric/.rvm/gems/[email protected]/gems/rails-2.3.5/lib/initializer.rb:622:in `load_application_initializers' 
/Users/Eric/.rvm/gems/[email protected]/gems/rails-2.3.5/lib/initializer.rb:621:in `each' 
/Users/Eric/.rvm/gems/[email protected]/gems/rails-2.3.5/lib/initializer.rb:621:in `load_application_initializers' 
/Users/Eric/.rvm/gems/[email protected]/gems/rails-2.3.5/lib/initializer.rb:176:in `process' 
/Users/Eric/.rvm/gems/[email protected]/gems/rails-2.3.5/lib/initializer.rb:113:in `send' 
/Users/Eric/.rvm/gems/[email protected]/gems/rails-2.3.5/lib/initializer.rb:113:in `run_without_spork' 
/Users/Eric/.rvm/gems/[email protected]/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/[email protected]/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/[email protected]/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:147:in `load' 
/Users/Eric/.rvm/gems/[email protected]/gems/rails-2.3.5/lib/initializer.rb:622:in `load_application_initializers' 
/Users/Eric/.rvm/gems/[email protected]/gems/rails-2.3.5/lib/initializer.rb:621:in `each' 
/Users/Eric/.rvm/gems/[email protected]/gems/rails-2.3.5/lib/initializer.rb:621:in `load_application_initializers' 
/Users/Eric/.rvm/gems/[email protected]/gems/rails-2.3.5/lib/initializer.rb:176:in `process' 
/Users/Eric/.rvm/gems/[email protected]/gems/rails-2.3.5/lib/initializer.rb:113:in `send' 
/Users/Eric/.rvm/gems/[email protected]/gems/rails-2.3.5/lib/initializer.rb:113:in `run_without_spork' 
/Users/Eric/.rvm/gems/[email protected]/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/[email protected]/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/[email protected]/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:147:in `load' 
/Users/Eric/.rvm/gems/[email protected]/gems/rails-2.3.5/lib/initializer.rb:622:in `load_application_initializers' 
/Users/Eric/.rvm/gems/[email protected]/gems/rails-2.3.5/lib/initializer.rb:621:in `each' 
/Users/Eric/.rvm/gems/[email protected]/gems/rails-2.3.5/lib/initializer.rb:621:in `load_application_initializers' 
/Users/Eric/.rvm/gems/[email protected]/gems/rails-2.3.5/lib/initializer.rb:176:in `process' 
/Users/Eric/.rvm/gems/[email protected]/gems/rails-2.3.5/lib/initializer.rb:113:in `send' 
/Users/Eric/.rvm/gems/[email protected]/gems/rails-2.3.5/lib/initializer.rb:113:in `run_without_spork' 
/Users/Eric/.rvm/gems/[email protected]/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/[email protected]/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/[email protected]/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:147:in `load' 
/Users/Eric/.rvm/gems/[email protected]/gems/rails-2.3.5/lib/initializer.rb:622:in `load_application_initializers' 
/Users/Eric/.rvm/gems/[email protected]/gems/rails-2.3.5/lib/initializer.rb:621:in `each' 
/Users/Eric/.rvm/gems/[email protected]/gems/rails-2.3.5/lib/initializer.rb:621:in `load_application_initializers' 
/Users/Eric/.rvm/gems/[email protected]/gems/rails-2.3.5/lib/initializer.rb:176:in `process' 
/Users/Eric/.rvm/gems/[email protected]/gems/rails-2.3.5/lib/initializer.rb:113:in `send' 
/Users/Eric/.rvm/gems/[email protected]/gems/rails-2.3.5/lib/initializer.rb:113:in `run_without_spork' 
/Users/Eric/.rvm/gems/[email protected]/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/[email protected]/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/[email protected]/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:147:in `load' 
/Users/Eric/.rvm/gems/[email protected]/gems/rails-2.3.5/lib/initializer.rb:622:in `load_application_initializers' 
/Users/Eric/.rvm/gems/[email protected]/gems/rails-2.3.5/lib/initializer.rb:621:in `each' 
/Users/Eric/.rvm/gems/[email protected]/gems/rails-2.3.5/lib/initializer.rb:621:in `load_application_initializers' 
/Users/Eric/.rvm/gems/[email protected]/gems/rails-2.3.5/lib/initializer.rb:176:in `process' 
/Users/Eric/.rvm/gems/[email protected]/gems/rails-2.3.5/lib/initializer.rb:113:in `send' 
/Users/Eric/.rvm/gems/[email protected]/gems/rails-2.3.5/lib/initializer.rb:113:in `run_without_spork' 
/Users/Eric/.rvm/gems/[email protected]/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/[email protected]/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/[email protected]/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:147:in `load' 
/Users/Eric/.rvm/gems/[email protected]/gems/rails-2.3.5/lib/initializer.rb:622:in `load_application_initializers' 
/Users/Eric/.rvm/gems/[email protected]/gems/rails-2.3.5/lib/initializer.rb:621:in `each' 
/Users/Eric/.rvm/gems/[email protected]/gems/rails-2.3.5/lib/initializer.rb:621:in `load_application_initializers' 
/Users/Eric/.rvm/gems/[email protected]/gems/rails-2.3.5/lib/initializer.rb:176:in `process' 
/Users/Eric/.rvm/gems/[email protected]/gems/rails-2.3.5/lib/initializer.rb:113:in `send' 
/Users/Eric/.rvm/gems/[email protected]/gems/rails-2.3.5/lib/initializer.rb:113:in `run_without_spork' 
/Users/Eric/.rvm/gems/[email protected]/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/[email protected]/gems/spork-0.8.2/bin/../lib/spork.rb:23:in `prefork' 
spec/spec_helper.rb:7 



--- spec/spec_helper.rb --- 

ответ

0

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