[Rabbit-dev] Questions about the RabbIT
Robert Olofsson
robert.olofsson at khelekore.org
Sat Nov 14 16:54:20 CET 2009
On Tue, 10 Nov 2009 17:13:52 -0700
Samat K Jain <lists at samat.org> wrote:
> On Tuesday 10 November 2009 03:35:43 pm, Robert Olofsson wrote:
> > Did you have any time to try out the java based image converter?
> > With 4.3-pre-5 it even has some type of memory usage protection.
> > I have been running with the java based conversion for some time
> > and it seems to work ok for my usage, but what do I know.
> >
> > Anyone else that can see any difference in speed/cpu usage/image
> > quality/<other>?
>
> I've been using it for about a week and a half.
>
> I haven't noticed any differences in speed or CPU usage, but it feels like image quality is lower (I haven't quantitatively tested). With 4.3-pre-2 there was also some issue where certain images would recompress with a strong red tint (fixed in recent builds).
Ok, since I wanted to know I wrote a small benchmarking program
that times image conversion.
The results are not really what I expected.
The java based converter is _much_ faster on my machine.
Small image 6550 bytes:
ImageMagick convert took 160112 millis, on average: 160.112 millis
JavaConvert convert took 2320 millis, on average: 2.32 millis
Medium sized image 112326 bytes:
ImageMagick convert took 172001 millis, on average: 172.001 millis
JavaConvert convert took 73231 millis, on average: 73.231 millis
Medium sized image, 160928 bytes:
ImageMagick convert took 199568 millis, on average: 199.568 millis
JavaConvert convert took 33531 millis, on average: 33.531 millis
Big image, 3066439 bytes:
ImageMagick convert took 979269 millis, on average: 979.269 millis
JavaConvert convert took 504584 millis, on average: 504.584 millis
The output is reasonably similar, the java based converter tend to
output slightly larger files (.c = convert, .j = java based)
-rw-r--r-- 1 robo robo 3066439 2009-11-14 16:10 big.jpg
-rw-r--r-- 1 robo robo 123766 2009-11-14 16:11 big.jpg.c
-rw-r--r-- 1 robo robo 170232 2009-11-14 16:11 big.jpg.j
-rw-r--r-- 1 robo robo 112326 2009-11-14 15:38 kreml.jpg
-rw-r--r-- 1 robo robo 12759 2009-11-14 15:45 kreml.jpg.c
-rw-r--r-- 1 robo robo 12237 2009-11-14 15:42 kreml.jpg.j
-rw-r--r-- 1 robo robo 160928 2009-11-14 16:10 pa030039.jpg
-rw-r--r-- 1 robo robo 15601 2009-11-14 15:54 pa030039.jpg.c
-rw-r--r-- 1 robo robo 18226 2009-11-14 15:50 pa030039.jpg.j
-rw-r--r-- 1 robo robo 6550 2009-11-14 15:07 ps.jpg
-rw-r--r-- 1 robo robo 1317 2009-11-14 15:40 ps.jpg.c
-rw-r--r-- 1 robo robo 1801 2009-11-14 15:37 ps.jpg.j
Running GraphicsMagick I see a much better times, small image:
GraphicsMagick convert took 13039 millis, on average: 13.039 millis
JavaConvert convert took 2486 millis, on average: 2.486 millis
Medium image 1:
GraphicsMagick convert took 32332 millis, on average: 32.332 millis
JavaConvert convert took 73218 millis, on average: 73.218 millis
Medium image 2:
GraphicsMagick convert took 44901 millis, on average: 44.901 millis
JavaConvert convert took 35046 millis, on average: 35.046 millis
The red tint most probably comes from transparent backgrounds,
I have made no changes to handle it better.
So as it is now, I would probably suggest running graphicsmagick.
The java based converter is probably faster for small to medium
sized images, but image quality may be a bit worse and image sizes
are a bit bigger, so in all graphicsmagick looks like the win for
now.
/robo
More information about the Rabbit-dev
mailing list