Clear out your old gems… It could save you time and ram…
So I was just looking through some of the ObjectSpace of one of my apps, and I decided to have a scan over the String list by hand. I’m kinda glad I did, because after my discovery, my copy of ruby is loading quite a bit faster, regularly. No really.
I had facets installed. I’ve never actually used facets in one of my projects, but I have had a look through it a few times in the past mostly out of curiosity. Since I’ve done a gem update before, to update all the gems on my machine, I actually had two copies installed.
Well, comparatively, I went from 3.2mb of strings, down to 2.6mb in my application load, by uninstalling facets.
The observation here is though, that rubygems loads up quite a bit of information about the documentation and files installed on your system as gems. If you want your ruby load times to remain snappy, start removing old gems that you never use. Always remove facets (if you can)… If you use it, start splitting out what you need, and forget the gem. Yes it’s full of useful stuffs and examples, but it’s also huge.
It’s also worth noting I think, that I was on facets versions: facets-1.4.5 and facets-1.8.54. I installed facets-2.0 just to have a look, and it’s become a little smaller. Anyway, I’m still having it off my machine for now.
Hahaha… that’s funny.
Also, `sudo gem cleanup`