Re: [cricket-users] Both static and dynamic graphs?

From: Jeff Allen (jra@corp.webtv.net)
Date: Thu May 06 1999 - 16:34:58 PDT


From: Jeff Allen <jra@corp.webtv.net>

Your ideas about static image generation are sound, but let me just be
devil's advocate for a second...

Noam Freedman wrote:
> The grapher.cgi would know to first look for the static image in a set
> location (~/cricket-graphs/....), and if it does not find it there it
> would generate it on the fly.

How is this different from image caching? With image caching, what we
do is turn the parameters into a filename, and serve that image
directly if we find it on disk, and it's fresh enough. What you are
talking about is making the graph every five minutes whether you are
going to look at it or not, and put it on the disk in a certain
filename, then serving that file up when asked for it.

With the system I use for image caching, we shortcut the entire job of
reading the config tree, and instead immediately turn the parameters
into a filename. I'm not certain if you'll be able to shortcut the
config tree stuff still with your approach -- and that can be a
significant cost.

Basically, I'm asking you "what is the problem you are trying to
solve?". Is Cricket too slow? If so, CGI overhead (followed closely by
Config Tree parsing) is the bottleneck you need to solve, not image
drawing time. mod_perl is the right way to solve CGI overhead. As of
Cricket 0.64 there will be a new and improved set of routines to talk
to the config tree which are much faster.

If you feel like you need to make the images statically, and you can
do it with simple patches (or preferably, a new companion to collector
called "bulk-graph" or something) then I'm ready and willing to
integrate your changes. If you need to turn everything on it's head to
make static graphs work, I'm not too excited about that, and I will
probably exercise my perogative to "lose" your patch... :)

Let's talk about this and see if we can make certain we are doing the
least work to fix the problem you are having.

-- 
Jeff R. Allen                   |   jra@corp.webtv.net (work)
WebTV Networks, Inc.            |   jeff.allen@acm.org (personal)
Service Operations Toolsmith    |   http://www.munitions.com/~jra

------------------------------------------------------------------------ What's "Grow to Give"? http://www.onelist.com It's a new incentive program at ONElist. See homepage for details.



This archive was generated by hypermail 2b29 : Mon Mar 06 2000 - 19:00:48 PST