You are here: Re: Thumbnail generator « PHP Programming Language « IT news, forums, messages
Re: Thumbnail generator

Posted by Erwin Moller on 01/23/08 08:58

flamer die.spam@hotmail.com wrote:
> Hi all, I have a new website im setting up, its a large image archive,
> I have it setup to open a folder, go through and for each file in that
> folder check a /tn sub-folder for a matching name, if the name doesnt
> exist, it means a new image has been added and that a thumbnail should
> be made, when thumbnails are made they are stored rather than deleted
> (like most gallery software does) this check happens every time a
> folder is opened. the problem is performance, this site will have
> around 25k images in each folder, on my testing with 800 images in a
> folder the scirpt times out 3 times before all the thumbs are made.
> the server is fairly decent but it shoots up to 100% cpu usage when
> the script is executed.. this is the script i have for making the
> thumbs: (i should mentioned for the folders where all thumbs already
> exist its very fast so the issue is in this script somewhere)
>
> * i tried turning the quality down from 60 to 6, it still took 40
> seconds to generate 137 images totalling 87mb for the fullsize and
> 165kb for 137 thumbs
>


<snipped function without studying it>

Hi flamer,

In my opinion you try to fix the wrong thing.
thumbnailing 800 images is a big job, even for a good server.

I do not understand WHY this thumbnailing must happen when the folder is
opened.
Why don't you make a cronjob that checks for missing images, or even
better: make a thumbnail the moment a new image is added?
Why do it in this strange way?

Regards,
Erwin Moller

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация