moerderspiel
moerderspiel copied to clipboard
Need a graph cache
Graph generation has become too expensive. We need a cache and invalidate mechanism...
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:
Oh, and should the graphs generated by graphviz not render nicely in sag, one could also try some R instead.