Problem with performance using the caption option

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
jjbaranowski
Posts: 11
Joined: 2013-01-18T08:56:57-07:00
Authentication code: 6789

Problem with performance using the caption option

Post by jjbaranowski »

Hello,

I ran into a problem with performance using the caption option on the latest version of ImageMagick-6.8.3-6. I had an older server running ImageMagic-6.7.0-10 and the following command takes 2 seconds to complete. When I run it with the latest version, it take close to 50 seconds to complete.

convert -size 1325x708 xc:none -size 1275x650 -background none -gravity center -font Arial caption:"This is a test. This is another test. This is just another test." -compose over -composite testfile.png

I removed the latest version and replaced it with an older version (ImageMagic-6.7.0-10) and tested the command again on the newly built server and it worked great. It took 2 seconds to complete. I took the time to install version 6.7.5-10 and it worked fast as well. I then continued to install versions 6.7.6-10 through 6.8.0-10 and tested each version with the command above and found that all versions finished the command in 2-3 seconds until I reached version 6.7.9-10. This version is the version where it started to take a very long time to complete and every version there after. It works, yes, but not usable in a real world application. Can anyone shed some light on this? I'm not sure what I can do to fix this problem.

Thanks,

-John
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Problem with performance using the caption option

Post by snibgo »

What platform are you on? I'm on Windows 7.

The performance issue seems to be in "caption:", so here's a simplified version:

Code: Select all

"%IMG680%convert" ^
  -size 1275x650 -background none -gravity center -font Arial caption:"This is a test. This is another test. This is just another test." ^
  testfile3.png
My timings:
v6.7.9-6: 3 seconds
v6.8.0-0: 2 min 38s
v6.8.3-0: 2 min 35s
snibgo's IM pages: im.snibgo.com
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Problem with performance using the caption option

Post by magick »

We can reproduce the problem you posted and have a patch in ImageMagick 6.8.3-7 Beta available by sometime tomorrow. Thanks.
jjbaranowski
Posts: 11
Joined: 2013-01-18T08:56:57-07:00
Authentication code: 6789

Re: Problem with performance using the caption option

Post by jjbaranowski »

Thanks for the quick response. Looking forward to trying the latest version again. Let me know when it's available to download.

-John
Post Reply