Follow up from #1017 . Right now a subplot is rendered even if nothing has changed in it, this is expensive when we have lots of subplots and especially when we have lots of docks with the HistogramLUTTool next to images. I think we can implement reactive rendering like this:
Graphic has a method Graphic.flag_update() which is called whenever anything about a graphic changes. This just sets PlotArea.flag_update = True. PlotArea.render() does nothing if PlotArea.flag_update is False.
- The camera also sets
PlotArea.flag_update when its state changes, not entirely sure how to do that yet.
If we do use the plot area flag, if something about a graphic changes we should do the check only if it's False.
@clewis7 thoughts?
Follow up from #1017 . Right now a subplot is rendered even if nothing has changed in it, this is expensive when we have lots of subplots and especially when we have lots of docks with the
HistogramLUTToolnext to images. I think we can implement reactive rendering like this:Graphichas a methodGraphic.flag_update()which is called whenever anything about a graphic changes. This just setsPlotArea.flag_update = True.PlotArea.render()does nothing ifPlotArea.flag_updateisFalse.PlotArea.flag_updatewhen its state changes, not entirely sure how to do that yet.If we do use the plot area flag, if something about a graphic changes we should do the check only if it's False.
@clewis7 thoughts?