Performance Issues - taking to much time to convert images

Apr 8, 2014 at 9:01 PM
Hi All,
  We are using a Window Service to read messages from a Message Queue Server, then we use Magick.NET to convert the photos into 3 different size: 
320x240
640x480
1280x720

The size og the images we are tryng to upload are almost 5mb.

When we tried to convert like 200 photos reading from the Queue took a very long time, we were using the 6.8.8.201 64bit 16Q, reading other post we change to the lastest version of 64bits 8Q, in order to improve the performance since the Q8 version dont use HDRI.

Is there some else that we can do to improve it?

Wonderfull library it is helping us a lot!
Thanks, Cristian.
Coordinator
Apr 8, 2014 at 9:19 PM
Are you converting multiple images at the same time? If you convert too much images at the same time you can run out of memory and Magick.NET will switch to disk cache which is terribly slow.

Have you measured which part of your action is slow? Is it reading/writing of the image or is it the resize action? And what do you consider slow?
Apr 9, 2014 at 1:51 PM
Hi dlemsta,

Thank you for you fast answer.
-Are you converting multiple images at the same time?
No we are converting one a time.
-Have you measured which part of your action is slow?
Well the think it is consuming 100% of the CPU. So take make it slowly. I dont now exactly what is causing it.
-Is it reading/writing of the image or is it the resize action?

if (img.Height > img.Width)
            {
                img.Resize(0, maxHeight);
            }
            else
            {
                img.Resize(maxWidth, 0);
            }
            img.Composite(wtmark, Gravity.Southeast, CompositeOperator.Atop);
-And what do you consider slow?
So it is slow when the cpu get the 100%.

Thanks, Cristian.
Coordinator
Apr 9, 2014 at 3:37 PM
It is not that strange that it is using 100% of your CPU. The resize actions are CPU intensive and Magick.NET uses as much processor power as it can get.

The next version of Magick.NET will include OpenCL support. This will move certain operations to the GPU instead of the CPU. But if your graphics card is not fast enough the CPU will be used. The first time your start Magick.NET with OpenCL it will measure the performance of your videocard and your CPU and decide which one is better. Adding a good video card or APU to your system might improve the performance.
Apr 9, 2014 at 6:36 PM
Oks! So I think a solution will be to add more CPU to our photoconverter server.

Thanks, you very much. I will be waiting anxious the new version with OpenCL. :D