Page 1 of 1

Performance Improvement

Posted: 2017-06-11T22:47:29-07:00
by rpatelob
I have been writing few custom image effects using MagickWand C, and later on use that effects.

Some effects are slow as they contains so many operations. I have written Clone and Destroy wands on many places so I guess it might affect on speed. There is a memory pool but I think it might be very difficult to manage.

And for ImageMagick shared library (.so file) __attribute__((constructor)) and __attribute__((destructor)) might be useful.

What are the steps I need to consider to improve the performance.

Few days ago I have been through https://docs.imgix.com/apis/url this site and their image processing is very fast but I guess they might be not using IM. So I just want to know that what are the things I need to keep in mind.

Re: Performance Improvement

Posted: 2017-06-12T06:40:48-07:00
by magick
See https://www.imagemagick.org/script/architecture.php. It discusses the trade-off of managing 200 image formats with performance. The greatest performance will likely comes from additional cores on your system. You also gain performance by using the Q8 non-HDRI build of ImageMagick. Q8 reduces the memory resources and non-HDRI reduces the number of floating point operations.

We can't see a use case for __attribute__((constructor)) and __attribute__((destructor)). They are also not cross platform. ImageMagick needs to compile on any system with an ANSI compliant compiler and many compilers do not support the proposed attributes.