Vixiom Axioms

November 23, 2007

Reduce your Rails RAM Usage with MiniMagick

Filed under: Ruby, Ruby on Rails Alastair @ 12:36 pm

If your Rails app uses Rmagick to resize images on shared hosting you may have had your app shut down because of a RAM spikes (the spike can be > 40mb when processing an image > 2mb).

MiniMagick to the rescue!

MiniMagick accesses ImageMagick directly, similar to exec(’my ImageMagick command’); in PHP. Since shared hosts are looking for Rails spikes not ImageMagick spikes your app won’t get killed. If you use Rick Olson’s excellent attachement_fu plug-in MiniMagick support is baked right in.

Digg! submit Reduce your Rails RAM Usage with MiniMagick to stumbleupon.com submit Reduce your Rails RAM Usage with MiniMagick to del.icio.us submit Reduce your Rails RAM Usage with MiniMagick to reddit.com Like this post? subscribe to the feed.

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

*
To prove you're a person (not a spam script), type the security word shown in the picture.
Anti-Spam Image

Powered by WordPress