Page 1 of 1
Faster to bundle imagemagick commands then run separately?
Posted: 2008-11-22T16:26:32-07:00
by gotskill10
This might be a case by case sort of question, but is it noticeably faster to bundle commands in a convert statement. Or does imagemagick just process commands in order, not optimizing several commands together. Im trying to figure out if I should be going to difficult lengths to keep the convert operations together instead of doing them seperately.
Anyone have some insight?
Re: Faster to bundle imagemagick commands then run separately?
Posted: 2008-11-22T17:33:19-07:00
by fmw42
gotskill10 wrote:This might be a case by case sort of question, but is it noticeably faster to bundle commands in a convert statement. Or does imagemagick just process commands in order, not optimizing several commands together. Im trying to figure out if I should be going to difficult lengths to keep the convert operations together instead of doing them seperately.
Anyone have some insight?
One issue is that it takes time to write to intermediate/temporary images that will be thrown away at the end.
Re: Faster to bundle imagemagick commands then run separately?
Posted: 2008-11-22T18:05:14-07:00
by el_supremo
There's also the overhead of starting up a new process for each new convert command. If you are doing these operations frequently it can make quite a difference to the load on your system.
Pete
Re: Faster to bundle imagemagick commands then run separately?
Posted: 2008-11-23T02:15:08-07:00
by anthony
There is a very slight overhead in starting multiple convert commands. But it is tiny compared to the overhead of having to write and later re-read an image from disk. Than
As for the original question. IM does process each of the operations in the order given. However some are only a 'setting' for later operations. For example -background -fill -virtual-pixels -interpolate -set -define