Page 1 of 1

PHP VPS

Posted: 2013-02-20T13:02:51-07:00
by JMTT
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?

Re: PHP VPS

Posted: 2013-02-20T14:52:30-07:00
by fmw42
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