[Mongrel] RMagick=bad, ???=good

Joey Geiger jgeiger at gmail.com
Wed Dec 20 19:52:49 EST 2006

Just as an update, I went and did some conversion and gutted
FlexImage, removing everything but the crop and resize actions, which
are the only ones I was using anyway. Removed RMagick and rewrote
stuff to use mini_magick. Everything seems to be working OK except an
issue with Tempfile on windows. It seems when I run my code on
Windows, the Tempfile is created and deleted before I'm done with it.
I found some code online that lets me persist tempfiles, which is fine
for me in Win32, since I'm only using it for development.

I did a bit of testing, and I was able to get the memory use of a
single mongrel to max out at about 56mb. Depending on what I was doing
with some images, it spiked to 80mb, but dropped back down to 56,
which is acceptable. This was on mongrel 1.0rc1 btw.

On 12/15/06, Rick Olson <technoweenie at gmail.com> wrote:
> On 12/15/06, David Heinemeier Hansson <david at loudthinking.com> wrote:
> > > Although our site is
> > > not running in Ruby, yet, we have worked through a number of
> > > approaches
> > > to handling this, but only one has the desired properties we need,
> > > which is automatic recovery and minimal impact to running code on
> > > failure: exec out another process to do image manipulation.
> >
> > I must admit that we do the same thing at 37signals. But actually not
> > because of memory leaks, but because we found it easier to do:
> >
> >      def thumbnail(temp, target)
> >        system "convert #{escape(temp)} -resize 48x48! #{escape(target)}"
> >      end
> >
> > Rather than to get the full RMagick machinery cooking.
> There's also minimagick, which is a shell around imagemagick commands.
>  Probably easier if you want to do more complex operations on your
> images.
> Oh, and ImageScience, which uses FreeImage and a light inline ruby
> wrapper.  http://seattlerb.rubyforge.org/ImageScience.html
> --
> Rick Olson
> http://weblog.techno-weenie.net
> http://mephistoblog.com
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users

More information about the Mongrel-users mailing list