Page 1 of 1

Montage seems slow

Posted: 2019-02-10T01:10:53-07:00
by gialandra
I use montage to create a composite image starting from about 1700 256x256 pixel 24 bit PNG images. My PC is a i7 + 16 GB RAM + SSD. It works like a charm but seems slow. Is there something to get the operations faster?

I use this command: magick montage -tile 37x -geometry +0+0 "C:\Users\...\2*.png" "C:\Users\...\2.png"

C:\Users\MN\Downloads>magick montage --version
Version: ImageMagick 7.0.8-24 Q16 x64 2019-01-17 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2018 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Visual C++: 180040629
Features: Cipher DPC Modules OpenMP
Delegates (built-in): bzlib cairo flif freetype gslib heic jng jp2 jpeg lcms lqr lzma openexr pangocairo png ps raw rsvg tiff webp xml zlib

Re: Montage seems slow

Posted: 2019-02-10T04:27:23-07:00
by snibgo
Your output filename is included in your input filename, so if you run the command twice, the previous output will be one of the inputs.
wrote:It works like a charm but seems slow. Is there something to get the operations faster?
How slow is "slow"? The command does a load of work, so will take some time. A system tool (such as taskmgr in Windows) can tell you cpu, memory and disk resources used, and hence whether a bottleneck might be removed.

Check the command doesn't create temporary files when it runs.

PNG isn't the fastest format in the world, especially if your images are photos.

Re: Montage seems slow

Posted: 2019-02-10T06:28:12-07:00
by magick
ImageMagick allocates a number of your images in memory until memory is exhausted and then places the rest on your SSD. Since memory is nearly exhausted, subsequent memory request likely spikes swapping to disk. Instead, push all images to SSD, reducing swapping. Assume your SSD is f:/tmp, try this command:

Code: Select all

montage -define registry:temporary-path="f:/tmp" -limit area 0 -tile 37x -geometry +0+0 "C:\Users\...\2*.png" "C:\Users\...\2.png"