rubygems memory patch

This patch against RubyGems 1.1.1 improves memory usage by not keeping every unused gemspec permanently in memory. It should have low CPU impact as long as you do your gem requires up-front.

For MacPorts:

cd /opt/local/lib/ruby/site_ruby/1.8
curl https://evanweaver.files.wordpress.com/2010/12/rubygems-memory-1_1_1.diff \
  | sudo patch -p0

Incidentally, I used BleakHouse to track down which references were getting retained.

3 responses

  1. Should I be able to gem update --system and get a 1.1.2 release with this? Or is this patch only for RubyGems hackers?

  2. It’s for patching your local or production system.

    It removes an API method so I kind of figured it wouldn’t get accepted into the official version. Maybe that’s bogus.