Since I think this is more about internals than usage, I decided to post in this forum, hope it's OK.
I'm using the gographics/imagick Go language binding for imagemagick in my program, whose main function is to load, resize and save a lot of JPEG files as fast as possible (in parallel). After doing some experiments I came to the conclusion that the bottleneck is loading pictures, and what is more, it seems it is performed serially.
After taking a dive into imagemagick sources (version 188.8.131.52 as this is what Ubuntu 12.04 precise has) I've discovered that magick/constitute.c:ReadImage seems to be acquiring a mutex if the codec does not support threading:
Code: Select all
if (GetDelegateThreadSupport(delegate_info) == MagickFalse) LockSemaphoreInfo(constitute_semaphore);
- is the above assessment correct, or did I get something wrong?
- why is there no thread support for JPEG codec?
- are there plans to change this?
- do I have any other options?