One thing I really really love about Compass is how it helps me sprite-ing my images. It is really helpful for this task. However, couple of days ago I stumbled upon this weirdness when sprite-ing my file: It used ridiculously amount of RAM for sprite-ing my images. Heck, even the iMac I used at the office became unresponsive I was forced to restart the iMac couple of times by holding the power button. I tried to check this issue using my own MacBook Pro which have more RAM than the iMac I used. Surprisingly, it showed that ruby uses near 5 GB of RAM. A memory hog. No wonder I had to force restart the 4 GB iMac I used at the office.

Ruby Memory Hog


I googled this problem and this GitHub discussion really explained the problem. Apparently, this kind of problem appears if you drop non-png formatted image on the directory that is being sprite-ed (as far as I know, you can only use .png file for sprite-ing image using Compass). The second after I read this GitHub, I realized that I just updated one of the assets as .jpg even though the extension of the file was .png.

A .jpg image with .png extension. Facepalm.

Lesson learned: be careful with the file type you drop on the auto sprite-ed directory. Make sure that all images you used are formatted as .png.