Improve performance on graph rendering
Improve performance on graph rendering

Factor out some common computations to allow the graph to render faster.
It now renders fast enough to support links on a physical device.

dphilipson/graphito,dphilipson/graphito,dphilipson/graphito