phetsims / griddle

Dynamic charting library built with Scenery
MIT License
2 stars 4 forks source link

ScrollingChartNode needs to be faster #56

Closed jessegreenberg closed 4 years ago

jessegreenberg commented 4 years ago

It is quite slow in its usage in causing energy-skate-park and needs to be optimized.

What comes to mind immediately is that this chart is drawn with Path/Shape rather than CanvasNode, and the shapes are somewhat complex. The chart is also redrawn frequenly as Properties change (modelViewTransformProperty, valueProperty, changes to DynamicSeries). If we use CanvasNode, we can be sure that the chart is only redrawn once per animation frame (in addition to the other performance benefits of using canvas).

I am going to start with DynamicSeriesNode since I suspect that is the slowest, but it is possible that GridNode should use CanvasNode as well.

jessegreenberg commented 4 years ago

DynamicSeriesNode is now drawn with CanvasNode, and it is substantially faster in energy-skate-park. This work is being done as part of improvements for #46, and so closing this issue to be continued there.