Use `ms_threshold` throughout remaining profilers
							parent
							
								
									b83ec0fad6
								
							
						
					
					
						commit
						7555cb4318
					
				|  | @ -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, | ||||||
|         ) |         ) | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -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() |  | ||||||
|  |  | ||||||
|  | @ -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) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue