Use `ms_threshold` throughout remaining profilers

incremental_update_paths
Tyler Goodlet 2022-05-13 16:23:31 -04:00
parent 5e602214be
commit 09e988ec3e
3 changed files with 11 additions and 13 deletions

View File

@ -1268,9 +1268,9 @@ class ChartPlotWidget(pg.PlotWidget):
''' '''
profiler = pg.debug.Profiler( profiler = pg.debug.Profiler(
msg=f'`{str(self)}.maxmin()` loop cycle for: `{self.name}`', msg=f'`{str(self)}.maxmin(name={name})`: `{self.name}`',
disabled=not pg_profile_enabled(), disabled=not pg_profile_enabled(),
gt=ms_slower_then, ms_threshold=ms_slower_then,
delayed=True, delayed=True,
) )

View File

@ -762,7 +762,7 @@ class ChartView(ViewBox):
profiler = pg.debug.Profiler( profiler = pg.debug.Profiler(
msg=f'`ChartView._set_yrange()`: `{self.name}`', msg=f'`ChartView._set_yrange()`: `{self.name}`',
disabled=not pg_profile_enabled(), disabled=not pg_profile_enabled(),
gt=ms_slower_then, ms_threshold=ms_slower_then,
delayed=True, delayed=True,
) )
set_range = True set_range = True
@ -833,7 +833,7 @@ class ChartView(ViewBox):
ylow, yhigh = yrange ylow, yhigh = yrange
profiler(f'maxmin(): {yrange}') profiler(f'callback ._maxmin(): {yrange}')
# view margins: stay within a % of the "true range" # view margins: stay within a % of the "true range"
diff = yhigh - ylow diff = yhigh - ylow
@ -932,8 +932,8 @@ class ChartView(ViewBox):
# due to the way delaying works and garbage collection of # due to the way delaying works and garbage collection of
# the profiler in the delegated method calls. # the profiler in the delegated method calls.
delayed=False, delayed=False,
# gt=3, ms_threshold=6,
gt=ms_slower_then, # ms_threshold=ms_slower_then,
) )
# TODO: a faster single-loop-iterator way of doing this XD # TODO: a faster single-loop-iterator way of doing this XD
@ -958,9 +958,7 @@ class ChartView(ViewBox):
use_vr=True, use_vr=True,
# gets passed down into graphics obj # gets passed down into graphics obj
profiler=profiler, # profiler=profiler,
) )
profiler(f'range change updated {chart_name}:{name}') profiler(f'<{chart_name}>.update_graphics_from_flow({name})')
profiler.finish()

View File

@ -170,7 +170,7 @@ def gen_qpath(
profiler = pg.debug.Profiler( profiler = pg.debug.Profiler(
msg='gen_qpath ohlc', msg='gen_qpath ohlc',
disabled=not pg_profile_enabled(), disabled=not pg_profile_enabled(),
gt=ms_slower_then, ms_threshold=ms_slower_then,
) )
x, y, c = path_arrays_from_ohlc( x, y, c = path_arrays_from_ohlc(
@ -353,7 +353,7 @@ class BarItems(pg.GraphicsObject):
# ''' # '''
# profiler = profiler or pg.debug.Profiler( # profiler = profiler or pg.debug.Profiler(
# disabled=not pg_profile_enabled(), # disabled=not pg_profile_enabled(),
# gt=ms_slower_then, # ms_threshold=ms_slower_then,
# delayed=True, # delayed=True,
# ) # )
@ -718,7 +718,7 @@ class BarItems(pg.GraphicsObject):
profiler = pg.debug.Profiler( profiler = pg.debug.Profiler(
disabled=not pg_profile_enabled(), disabled=not pg_profile_enabled(),
gt=ms_slower_then, ms_threshold=ms_slower_then,
) )
# p.setCompositionMode(0) # p.setCompositionMode(0)