MagickGetImageBlob and GetCubeInfo slow?
Posted: 2008-09-26T09:53:52-07:00
I have been profiling an application of mine that basically reads in an image, resizes it and then uses this resized image for stuff.
The order of events is (pseudo):
status = MagickReadImageBlob(wand,img_ptr,total_size);
status = MagickResizeImage(wand,data->x,data->y,BoxFilter,1);
new_img_ptr = MagickGetImageBlob(wand,&new_size);
When I run this under callgrind, I see a ton of time spent inside MagickGetImageBlob. Considering just MagickGetImageBlob, 92.32% is spent inside one function: GetCubeInfo(). When I pull out to consider the total time inside MagickGetImageBlob, it amounts to 7.64% of the application time, where 7.02% is spent inside GetCubeInfo().
This applications first design goal is speed, so obviously, if I can reduce or eliminate that 7%, it would benefit me greatly. Does anyone have any ideas on how to achieve this?
ImageMagick6.2.9 if that matters.
Any help would be appreciated,
--Jumby
The order of events is (pseudo):
status = MagickReadImageBlob(wand,img_ptr,total_size);
status = MagickResizeImage(wand,data->x,data->y,BoxFilter,1);
new_img_ptr = MagickGetImageBlob(wand,&new_size);
When I run this under callgrind, I see a ton of time spent inside MagickGetImageBlob. Considering just MagickGetImageBlob, 92.32% is spent inside one function: GetCubeInfo(). When I pull out to consider the total time inside MagickGetImageBlob, it amounts to 7.64% of the application time, where 7.02% is spent inside GetCubeInfo().
This applications first design goal is speed, so obviously, if I can reduce or eliminate that 7%, it would benefit me greatly. Does anyone have any ideas on how to achieve this?
ImageMagick6.2.9 if that matters.
Any help would be appreciated,
--Jumby