This question is about optimizing performance when processing animated gifs.
I am using and amazon High-CPU Medium EC2 server instance to process images. It has the following specs:
1.7 GiB of memory
5 EC2 Compute Units (2 virtual cores with 2.5 EC2 Compute Units each)
The gif I am processing is about 1MB in size.
What I am doing is adding an image to each frame. I am using coalesceImages to access the individual frames.
Throughout the process I create about 4 image objects at various points. This process currently takes up about 50% + of CPU,
and On a lesser machine, it will take 100%. I have tried limiting threads to 1 but it doesn't seem to make much, if any, of a difference.
Are there ImageMagick settings that I can tweak that might speed this up a bit? Or is the amount of CPU being used about right to do this?
PHP VPS
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: PHP VPS
speed can be traded for quality by using -treedepth with -colors when creating/saving gif image
see
http://www.imagemagick.org/script/comma ... php#colors
http://www.imagemagick.org/script/comma ... #treedepth
see
http://www.imagemagick.org/script/comma ... php#colors
http://www.imagemagick.org/script/comma ... #treedepth