diff --git a/piker/ui/_interaction.py b/piker/ui/_interaction.py index adc551dc..bd59992f 100644 --- a/piker/ui/_interaction.py +++ b/piker/ui/_interaction.py @@ -37,6 +37,7 @@ from ..log import get_logger from ._style import _min_points_to_show from ._editors import SelectRect from . import _event +from .._profile import pg_profile_enabled, ms_slower_then # from ._ohlc import BarItems @@ -862,10 +863,16 @@ class ChartView(ViewBox): chart = self._chart # graphics = list(self._chart._graphics.values()) + profiler = pg.debug.Profiler( + msg=f'FastAppendCurve.update_from_array(): `{chart.name}`', + disabled=not pg_profile_enabled(), + gt=ms_slower_then, + ) for name, graphics in chart._graphics.items(): # pass in no array which will read and render from the last # passed array (normally provided by the display loop.) chart.update_graphics_from_array(name) + profiler(f'updating {name}') # for graphic in graphics: # ds_meth = getattr(graphic, 'maybe_downsample', None)