Page 1 of 1

help!!! how to improve Magick::Image.read

Posted: 2014-10-16T03:50:42-07:00
by youbinliu
hi,could anybody help me to fix this problem?
code like this:
blob = new(std::nothrow) Magick::Blob(image_buffer.c_str(),image_buffer.length());
img->read(*blob)

I use multi threads to process image. Now, I start 5 threads to run
when image is 5000x3000, process cpu reach 99%, and "read" cost 6s
like,when threads is more, read cost more time
how to reduce read cost time?

Re: help!!! how to improve Magick::Image.read

Posted: 2014-10-16T05:39:32-07:00
by dlemstra
I think you should reduce the number of threads when you have large images or add more memory to your system. If the image cannot be loaded into the memory it will use the harddisk. This will dramatically decrease the performance.