Slow GIF processing on server.

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
TriumphEnt
Posts: 12
Joined: 2013-04-25T06:36:58-07:00
Authentication code: 6789

Slow GIF processing on server.

Post by TriumphEnt »

I am presently working on the development of a social networking website (Drupal 7.) I have switched to ImageMagick from GD2 to enable the rendering of animated GIF files.
However, it takes up to 5 minutes for the server to process a single uploaded animation. In the mean time, the site freezes almost completely. The CPU works at 100%. This is an unacceptable situation for a site where members may upload lots of animated GIFs in the future.
What should I ask the hosting company to do to remedy or minimize this?
Any help would be greatly appreciated.
Thank you.
:)
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Slow GIF processing on server.

Post by snibgo »

What ImageMagick command is taking "5 minutes for the server to process a single uploaded animation"?

What is the IM version? Platform?
snibgo's IM pages: im.snibgo.com
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Slow GIF processing on server.

Post by magick »

Post a URL to a representative GIF animation and what convert you are using to convert it. We'll benchmark it and see how long the processing takes.
TriumphEnt
Posts: 12
Joined: 2013-04-25T06:36:58-07:00
Authentication code: 6789

Re: Slow GIF processing on server.

Post by TriumphEnt »

@snibgo
Version: ImageMagick 6.7.1-7 2012-01-13 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP
On Apache 2.2.24

I do not know the command that is used. The site is a Drupal site (v. 7) A module (ImageMagick) manages the commands (http://drupal.org/project/Imagemagick)

Having said that, it is when a user uploads an animated GIF that it slows down to a crawl. Once the image is converted, then it is readily available (without any delay) to other users viewing it.

Hope that helps. Thank you.
TriumphEnt
Posts: 12
Joined: 2013-04-25T06:36:58-07:00
Authentication code: 6789

Re: Slow GIF processing on server.

Post by TriumphEnt »

@magick
I do not know what command is used. Like I just told snigbo, commands are managed by a Drupal module (http:/www.drupal.org/project/ImageMajick)
The module is open source.

The best way to monitor the effect is to go to the site (http://www.zastey.com) and post an animated GIF in the photo gallery. You'll have to register though (short and simple) because that's when the user's photo gallery is created. You can upload pictures either in the user's profile or the user's gallery.

Hope that helps. Thank you.
TriumphEnt
Posts: 12
Joined: 2013-04-25T06:36:58-07:00
Authentication code: 6789

Re: Slow GIF processing on server.

Post by TriumphEnt »

I am attaching a screen capture shot of all the options the ImageMagick module gives. Hope this helps. :)
http://www.zastey.com/2013-04-25_1530.png
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Slow GIF processing on server.

Post by snibgo »

Have you tried the "display debugging information" tick-box?

This rings a vague bell. I think there was a similar query in these forums, maybe a year ago, that involved uploading animated GIFs to a site that did some unknown processing. The only answer I can suggest, if you can't find out the processing, is "get a faster computer."
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Slow GIF processing on server.

Post by fmw42 »

try disabling OpenMP and see if that helps. Also you can speed up the gif processing by using -treedepth at the expense of quality. see http://www.imagemagick.org/script/comma ... #treedepth
TriumphEnt
Posts: 12
Joined: 2013-04-25T06:36:58-07:00
Authentication code: 6789

Re: Slow GIF processing on server.

Post by TriumphEnt »

I have made some progress and now can process scaling of animated GIFs in under 3 minutes!
For this, I used the variable
<?php
$conf['image_allow_insecure_derivatives'] = TRUE;
?>
This is at the expense of security that added a token at the end of the image url. The token is now removed.

Still searching for an answer....
TriumphEnt
Posts: 12
Joined: 2013-04-25T06:36:58-07:00
Authentication code: 6789

Re: Slow GIF processing on server.

Post by TriumphEnt »

At long last, the problem's solution was found. It was on the server's side and it was not properly configured. Now everything is working well.
My thanks to all those who tried to help. :)
Post Reply