moerderspiel icon indicating copy to clipboard operation
moerderspiel copied to clipboard

Need a graph cache

Open orithena opened this issue 12 years ago • 2 comments

Graph generation has become too expensive. We need a cache and invalidate mechanism...

orithena avatar Dec 20 '12 17:12 orithena

Seconded, though I'm not entirely sure if the current code doesn't do it already?

1 idea that could be implemented rather shortly:

  • A Graph is valid until the next kill, if kills are timestamped this changes the complexity from "create a graph on each request" to "a data roundtrip and time comparison on each request + a graph on the first request after a kill". The last kill could even be denormalized to the game/round object, but that's probably not necessary.

1 idea for which I'm not sure how difficult it would be:

  • Move the rendering to the client and serve an svg for f* sake. The only reason that comes to mind to mind to use a bitmap format to show a graph is compatibility with the client, which shouldn't be a consideration anymore in the 2010s :expressionless: :flushed:

thegcat avatar Jun 02 '14 15:06 thegcat

Oh, and should the graphs generated by graphviz not render nicely in sag, one could also try some R instead.

thegcat avatar Jun 02 '14 16:06 thegcat