Performance Issues with ImageMagick

ImageMagickObject is a Windows COM+ interface to ImageMagick. COM+, Visual Basic, and Delphi users should post to this discussion group.
Post Reply
Posts: 2
Joined: 2017-08-30T15:04:58+00:00
Authentication code: 1151

Performance Issues with ImageMagick

Post by abhineetgunjan »

Hi All,

We are using Image Magick COM object in application to convert TIFF images into PDF Format. This application is deployed on Windows Server 2003 OS and is developed in Classic ASP and uses VBScript.
We are using following code snippet:

Code: Select all

Set image = CreateObject("ImageMagickObject.MagickImage.1")
stOriginal = "<location of tiff>"
stNew = "<location of PDF>"
image.convert stOriginal, stNew
Set image = Nothing
Please find below the details of installing Image Magick:
1. Installer File - ImageMagick-7.0.6-3-Q8-x86-dll.exe
2. Installation Options Selected -
  • Create a Desktop Icon
    Add Application Directory to your system path
    Install FFmpeg
    Install legacy utilities
    Install development headers and libraries for C and C++
    Install ImageMagickObject OLE Control for VBScript, Visual Basic, and WSH
We could see that performance of ImageMagick degrades a lot after 1- 1.5 days of usage. Currently, we are manually un-installing and re-installing Image Magick application to improve the application.

We would like to check following:
  • 1. If there are any configuration changes required to improve the performance of Image Magick
    2. If there are any suggestions based on above code snippet
    3. If there is any paid version of Image Magick with performance fixes and which can be used in our application
    4. Any pointers to other 3rd party utilities which can be used for this purpose
Posts: 12159
Joined: 2010-01-24T06:01:33+00:00
Authentication code: 1151
Location: England, UK

Re: Performance Issues with ImageMagick

Post by snibgo »

ImageMagick has nothing that would make the performance "degrade a lot after 1- 1.5 days of usage". Perhaps the performance of your computer as a whole degrades, and you see this most clearly with ImageMagick.

When resource usage nears saturation, performance degrades. (Like traffic jams on busy roads.) Perhaps your disk(s) are filling up, or memory usage increases.
snibgo's IM pages:
Posts: 2
Joined: 2017-08-30T15:04:58+00:00
Authentication code: 1151

Re: Performance Issues with ImageMagick

Post by abhineetgunjan »

ImageMagick was creating some temporary files in C:\Windows\Temp foldeer. We have written a housekeeping utility to periodically delete the temporary files.

Still, we are facing performance issues. We will put some logs to identify if issue is with ImageMagick or entire application slows down.
User avatar
Posts: 25562
Joined: 2007-07-03T00:14:51+00:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Performance Issues with ImageMagick

Post by fmw42 »

I know very little about Windows. But some things you might consider.

ImageMagick will not leave files in temp, unless the command you use crashes or does not finish properly. Not to say that you should not do housekeeping.

I would not use recommend that you use the temp directory for normal processing of images. You may not be doing that now. I do not know.

Tiff files can have large amounts of meta data. So if you do not need it, use -strip to remove it.

On some (typically Unix) systems, ImageMagick can run slower on some operations with OpenMP enabled. You may want to try disabling it or limiting threads.
Post Reply