NYCPHP Meetup

NYPHP.org

[nycphp-talk] GD imageCreate

Andrew M. Yochum andrew at digitalpulp.com
Mon Sep 9 15:09:18 EDT 2002


Tim-

Fun with GD.... you're not alone in your frustration with the amount of
CPU it consumes to make one simple image.

Look at the imagepng() function... there is a 2nd optional argument that
will take a filename to output the file to.  With that you can generate
the image file to disk only as often as you'd like based on the system clock,
number of hits, etc. Saves your web server from being so bogged down a LOT.

Andrew

On Mon, 9 Sep 2002, Tim Sailer wrote:

> Is anyone using the imageCreate function to create on the fly
> graphics? I'm playing with my new toy, a weather station, and
> it's logging to a MySQL database. I'm taking the info, and creating
> a graphic button, which, when clicked, will go to graphs, etc.
> The problem is the load of the server when creating the graphic. I've run
> some stress tests, and the results are *not* pretty. Is there any way to 
> cache the image for a period of time?
> 
> Tim
> 
> PS: http://www2.buoy.com/weather has the graphic at the top
> 
> 

-- 
Andrew Yochum
Digital Pulp, Inc.
212.679.0676x255
andrew at digitalpulp.com




More information about the talk mailing list