Page 1 of 1

Optimization?

Posted: 2010-10-01T15:44:57-07:00
by 3DTOPO
Greetings,

I am trying out IM for the iPhone, and it works great!

Just seems like something must be being cached to disk or something, because running filters seems much slower than some other iPhone apps that I have seen based on IM.

Example: running the oil paint filter with a radius of 3 on an image 320px x 436px takes 8.432 seconds. Seems like it takes about 1 second on some other iPhone apps I have tried.

Seems to me the numbers are suspiciously like what caching to disk versus memory might be. I get the same results using MAGICK_AREA_LIMIT set to far higher than the amount required for such a small image.

I have compiled with -Os and -O2 and both are about 20% faster than without any optimization, but I can't figure out how to get it run any faster.

Any help would be greatly appreciated!


Thank you.

Re: Optimization?

Posted: 2010-10-01T15:50:27-07:00
by magick
Make sure you are using the Q8 version of ImageMagick. The default is Q16 (16-bits per pixel). If pixels are cached to disk, ImageMagick slows down substantially. Add -debug cache to the command line or set the MAGICK_DEBUG environment variable to 'cache'. ImageMagick tells you whether the pixels are cached to disk (slow) or memory (much faster).