Gem Weight

ruby

Mon Jan 12 20:46:37 -0800 2009

gemweight.rb is a script to calculate the memory use and load time of a given gem. This is a pretty off-the-cuff measure - it doesn’t consider dependencies loaded (or not loaded, if the gem loads them on demand). But I thought it was mildly interesting nonetheless. Results for some common gems:

activerecord26MB0.53s
dm-core20MB0.28s
sequel14MB0.22s
activesupport21MB0.40s
sinatra13MB0.21s
rush756k0.03s
erb252k0.00s
erubis12MB0.17s
haml12MB0.17s
activeresource25MB0.45s
rest_client13MB0.19s
httparty14MB0.19s
json11MB0.17s
xmlsimple13MB0.19s
hpricot13MB0.21s

The script: