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?
Faster to bundle imagemagick commands then run separately?
-
- Posts: 17
- Joined: 2007-06-02T14:01:34-07:00
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Faster to bundle imagemagick commands then run separately?
One issue is that it takes time to write to intermediate/temporary images that will be thrown away at the end.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?
-
- Posts: 1015
- Joined: 2005-03-21T21:16:57-07:00
Re: Faster to bundle imagemagick commands then run separately?
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
Pete
Sorry, my ISP shutdown all personal webspace so my MagickWand Examples in C is offline.
See my message in this topic for a link to a zip of all the files.
See my message in this topic for a link to a zip of all the files.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Faster to bundle imagemagick commands then run separately?
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
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
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/