|
Posted by Nicholas Sherlock on 07/31/05 05:24
Jim wrote:
> I've heard that resizing images through PHP (either GD2 or ImageMagick)
> is a processor intensive exercise. I'm setting up a site where users
> will be uploading up to 10 images along with the details of their
> product. For each image uploaded (max 500Kb), I'll be resizing it to
> create a small, medium and large version after which I'll discard the
> original. My worry is that as the site becomes more popular, the
> processor time spent resizing images could badly effect the other areas
> of the site (viewing/searching products).
If you are getting large volumes of traffic, you could create a system
where photos to be resized are added to a queue, then only processed at
a rate that doesn't affect the rest of the website. If you have control
over the thread priority of the resizing task, set it to idle or below
normal, then it only runs when the server has nothing else to do.
Cheers,
Nicholas Sherlock
[Back to original message]
|