Bugs item #29116, was opened at 2011-04-05 18:01 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=575&aid=29116&group_id=126
Category: #gem and #require methods Group: None Status: Open Resolution: None Priority: 3 Submitted By: Sam Goldstein (samgoldstein) Assigned to: Nobody (None) Summary: Mega slowness in custom require Initial Comment: I recently upgraded to rubygems 1.6.5 and started experiencing a major slowdown loading the environment for a Rails 2.3 application. I traced the problem back to the Kernel.require (custom_require.rb) and Gem.loaded_path?. It seems that searching $LOADED_FEATURES repeatedly is inefficient and results in a 4x slowdown in my specific case. I've downgraded to rubygems 1.3.5 which doesn't suffer from this problem. This is a major hurdle to developing in ruby, as it takes me ~45 seconds to load the environment and run one test. Below is some console output demonstrating the problem. /www/aboutus/app_root [master] $ time rake environment (in /www/aboutus/app_root) real 0m11.407s user 0m8.787s sys 0m2.552s /www/aboutus/app_root [master] $ sudo gem update --system Updating RubyGems Updating rubygems-update Successfully installed rubygems-update-1.7.1 Updating RubyGems to 1.7.1 Installing RubyGems 1.7.1 RubyGems 1.7.1 installed === 1.7.1 / 2011-03-32 * 1 bug fix: * Fixed missing file in Manifest.txt. (Also a bug in hoe was fixed where `rake check_manifest` showing a diff would not exit with an error.) ------------------------------------------------------------------------------ RubyGems installed the following executables: /usr/local/bin/gem /www/aboutus/app_root [master] $ time rake environment (in /www/aboutus/app_root) NOTE: SourceIndex.new(hash) is deprecated; From /www/aboutus/app_root/config/../vendor/rails/railties/lib/rails/vendor_gem_source_index.rb:100:in `new'. real 0m46.707s user 0m41.200s sys 0m5.394s Thanks! ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=575&aid=29116&group_id=126 _______________________________________________ Rubygems-developers mailing list http://rubyforge.org/projects/rubygems Rubygems-developers@rubyforge.org http://rubyforge.org/mailman/listinfo/rubygems-developers