Previously we added some optimization that avoids sending updated plot data if the data source is unchanged between frames. However the plotting class still went through the effort of updating the datasource even though it is unchanged, which can in some cases be fairly expensive in itself. This generalizes the previous optimization such that the data is only updated in dynamic mode if it has changed.
As a generalization of a previous optimization, this seems ok. The core condition seems to be:
self.static_source = self.dynamic and (current_id == previous_id)
Looking at the code, it seems that this