Apologies if this is the wrong section.
I run a site which is processing hundreds of images per minute. We use redis and php-resque to process the ImageMagick requests in the background, but wait times for each image can be 2-3 minutes due to the amount of requests + the slow processing time. Each request probably takes around 2 seconds, so when 500 image requests get queued up, users can wait up to 2-3 minutes per image.
What I'd like to do is be able to optimise ImageMagick to process these images much more faster, whether a setting or optimising our code.
The code we use to process each image is something like this:
Code: Select all
convert -size 600x400 xc:none \( ".$path."assets/images/bases/base_image_69509021433289153_8_0.png -fill rgb\(255,15,127\) -colorize 100% \) -composite \( ".$path."assets/images/bases/eye_image_60444011438514404_8_0.png -fill rgb\(15,107,255\) -colorize 100% \) -composite \( ".$path."assets/images/markings/marking_clan_8_marking_10_1433289499.png -fill rgb\(255,79,79\) -colorize 100% \) -composite \( ".$path."assets/images/bases/shading_image_893252771433289153_8_0.png -fill rgb\(135,159,255\) -colorize 100% \) -compose Multiply -composite \( ".$path."assets/images/bases/highlight_image_629750231433289153_8_0.png -fill rgb\(27,35,36\) -colorize 100% \) -compose Overlay -composite \( ".$path."assets/images/bases/lineart_image_433715161433289153_8_0.png -fill rgb\(0,0,0\) -colorize 100% \) -compose Over -composite ".$path."assets/generated/queue/tempt_preview_27992_userid_0_".$filename."_file.png
Does anyone have any help or tips we could use to help optimise this process?
Thank you to anyone who replies, I really appreciate it