Hi Running ''rake test_units'' using the simple example from the intro video is very slow on my computer. While the tests claim to execute in 0.17 secs, the startup time ad 5.3 seconds to the overall job. On the video, these tasks ran in about 1 second. (Maybe David was doing the tests on a dual proc mac or did some video editing, who knows.) But, I don''t think it should be taking that long on a 1.5GHz G4. Does anyone know why this would be taking so long? Is this due to some hostname lookup problem on the mac? Thanks % time rake test_units (in /Users/jdf/projects/devel/www/blablog) /opt/local/ruby-1.8.4/bin/ruby -Ilib:test "/opt/local/ruby-1.8.4/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake/rake_test_loader.rb" "test/unit/comment_test.rb" "test/unit/post_test.rb" Loaded suite /opt/local/ruby-1.8.4/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake/rake_test_loader Started .. Finished in 0.165222 seconds. 2 tests, 3 assertions, 0 failures, 0 errors 5.366u 1.098s 0:07.75 83.2% 0+0k 0+7io 0pf+0w -- Jim Freeze
Hi ! 2006/2/1, Jim Freeze <rails@freeze.org>:> Does anyone know why this would be taking so long? > Is this due to some hostname lookup problem on the mac?The slack time is taken up by booting the Rails environment. That in itself is taking a lot of time. Then, since dependencies are found because of illegal accesses (undefined constants), that takes a bit of time too. Add to that the sheer number of files that have to be loaded, parsed, compiled and stored (all in RAM, I agree), and that all adds up. One notable thing you can do is to not load the services you don''t need - Action Web Service and Action Mailer are the two that I most often don''t use. Hope that helps ! -- Fran?ois Beausoleil http://blog.teksol.info/
Francois Beausoleil wrote:> > One notable thing you can do is to not load the services you don''t > need - Action Web Service and Action Mailer are the two that I most > often don''t use.Is there an easy way to turn those off? Jeff -- Posted via http://www.ruby-forum.com/.
On Feb 1, 2006, at 9:55 PM, Francois Beausoleil wrote:> > One notable thing you can do is to not load the services you don''t > need - Action Web Service and Action Mailer are the two that I most > often don''t use. > > Hope that helps !Well yeah. A little. Thanks for the explanation, but why is it so fast on the video? I''m thinking it was done on Davids 17" powerbook, but I could be wrong. Jim Freeze
On Feb 1, 2006, at 11:19 PM, Jim Freeze wrote:> On Feb 1, 2006, at 9:55 PM, Francois Beausoleil wrote: >> >> One notable thing you can do is to not load the services you don''t >> need - Action Web Service and Action Mailer are the two that I most >> often don''t use. >> >> Hope that helps ! > > Well yeah. A little. Thanks for the explanation, but why is it so > fast on the video? > I''m thinking it was done on Davids 17" powerbook, but I could be > wrong.The number of gems you have installed adds a slight increase to startup times. gem cleanup will get rid of old duplicate gems for you. -- Eric Hodel - drbrain@segment7.net - http://segment7.net This implementation is HODEL-HASH-9600 compliant http://trackmap.robotcoop.com