jondot/graphene

don't redraw graph on every refresh

blackmad opened this issue · 3 comments

Super excited to play with graphene. I'm wondering if you've thought about only requesting data from graphite since the last draw of the graph and streaming it in? My understanding is that d3 can deal with adding data points to an existing graph.

Hi David,
I'm happy to hear you find Graphene interesting!.

You're correct; it is completely possible to do data incrementally. My assumption at the time was that there is already a 'generic' style Graphite dashboard running, so requesting "15min ago" would hit the query cache quite nicely, therefore not introducing new queries for Graphite to handle.

I was thinking, what you're suggesting might be a necessary optimization when someone feels it is problematic at the current state - do you?

In my experience, querying a loaded Graphite instance for "7 days ago" takes a very long time to refresh, because Graphite presumably doesn't efficiently cache parts of relative duration requests, if at all. Querying graphite for "1 minute ago" is much faster.

Therefore it would be much better to have Graphene do an incremental query for the last delta time it needs to update.

That would be very beneficial. It works fine for moderate amount of graphs even displaying some long periods, but when the same dashboard is used by many people then the traffic it generates is quite immense.