> 11:03am, Chad Gard wrote:
> 
> >
> > On Jan 21, 2005, at 10:22 AM, Sean Davis wrote:
> >
> >> You could also have your main script generate the images all at
once (at 
> >> the same time as you are generating the HTML), put the graphics in
temp 
> >> files, and then put the appropriate URLs in the img tags.  This will 
> >> eliminate the overhead of calling a helper script 9-25 times for a
single 
> >> page.  If you are on an intranet, serving 25 small images should be
almost 
> >> instantaneous.
> >
> > Yeah, though then I have to worry about cleaning up the temp
directory, and 
> > I'd like to avoid unnecessary writes to the hard drive (to avoid
directory 
> > damage possibilities, energy use, fragmentation, etc).  It logically
makes 
> > sense to just send these things out as they're generated.
> >
> Just a thought here: why do you have a hard drive if you're not going
to use 
> it? And "energy use"? You're not serious, are you? If the hard drive is 
> spinning, the extra energy used to move the heads is very, very little.
> 

If we are talking about energy use then surely the amount of energy
sucked in by the CPU to generate any kind of complex graphed graphic
will be higher than to move the heads on the disk. Out of curiousity do
you not use a web log?  So isn't there a disk write for every request
anyways?  How about a log on the database queries, running the query for
every HTML page hit is going to cause another write, never mind the
potential for errors to be written. Most likely the database also has
tuning to limit requests, what if you hit that limit while generating
your results, blocking someone needing to do something for real, when
all you had to do was serve up a static graphic generated 2 months ago.
And with the 8MB *cache* on some hard drives today there is a good
chance your popular 30kb graphic doesn't even have to come from the
platter...

Seems odd to question caching technology given that cpus (and even the
cache has a cache these days), gpus, harddrives, web servers, browsers,
etc, etc, etc. all use them...

http://danconia.org

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to