Add profiling to xrange update loop
parent
7d664c55ff
commit
c62d3dd82c
|
@ -37,6 +37,7 @@ from ..log import get_logger
|
||||||
from ._style import _min_points_to_show
|
from ._style import _min_points_to_show
|
||||||
from ._editors import SelectRect
|
from ._editors import SelectRect
|
||||||
from . import _event
|
from . import _event
|
||||||
|
from .._profile import pg_profile_enabled, ms_slower_then
|
||||||
# from ._ohlc import BarItems
|
# from ._ohlc import BarItems
|
||||||
|
|
||||||
|
|
||||||
|
@ -862,10 +863,16 @@ class ChartView(ViewBox):
|
||||||
chart = self._chart
|
chart = self._chart
|
||||||
# graphics = list(self._chart._graphics.values())
|
# 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():
|
for name, graphics in chart._graphics.items():
|
||||||
# pass in no array which will read and render from the last
|
# pass in no array which will read and render from the last
|
||||||
# passed array (normally provided by the display loop.)
|
# passed array (normally provided by the display loop.)
|
||||||
chart.update_graphics_from_array(name)
|
chart.update_graphics_from_array(name)
|
||||||
|
profiler(f'updating {name}')
|
||||||
|
|
||||||
# for graphic in graphics:
|
# for graphic in graphics:
|
||||||
# ds_meth = getattr(graphic, 'maybe_downsample', None)
|
# ds_meth = getattr(graphic, 'maybe_downsample', None)
|
||||||
|
|
Loading…
Reference in New Issue