Optimization?

The MagickWand interface is a new high-level C API interface to ImageMagick core methods. We discourage the use of the core methods and encourage the use of this API instead. Post MagickWand questions, bug reports, and suggestions to this forum.
Post Reply
3DTOPO
Posts: 28
Joined: 2010-07-05T16:13:53-07:00
Authentication code: 8675308

Optimization?

Post 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.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Optimization?

Post 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).
Post Reply