Always maybe render graphics
Since we have in-view style rendering working for all curve types (finally) we can avoid the guard for low uppx levels and without losing interaction speed. Further don't delay the profiler so that the nested method calls correctly report upward - which wasn't working likely due to some kinda GC collection related issue.incremental_update_paths
parent
64c6287cd1
commit
b97ec38baf
piker/ui
|
@ -20,7 +20,6 @@ Chart view box primitives
|
||||||
"""
|
"""
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
from contextlib import asynccontextmanager
|
from contextlib import asynccontextmanager
|
||||||
# import itertools
|
|
||||||
import time
|
import time
|
||||||
from typing import Optional, Callable
|
from typing import Optional, Callable
|
||||||
|
|
||||||
|
@ -907,17 +906,22 @@ class ChartView(ViewBox):
|
||||||
def maybe_downsample_graphics(self):
|
def maybe_downsample_graphics(self):
|
||||||
|
|
||||||
uppx = self.x_uppx()
|
uppx = self.x_uppx()
|
||||||
if not (
|
# if not (
|
||||||
# we probably want to drop this once we are "drawing in
|
# # we probably want to drop this once we are "drawing in
|
||||||
# view" for downsampled flows..
|
# # view" for downsampled flows..
|
||||||
uppx and uppx > 6
|
# uppx and uppx > 6
|
||||||
and self._ic is not None
|
# and self._ic is not None
|
||||||
):
|
# ):
|
||||||
profiler = pg.debug.Profiler(
|
profiler = pg.debug.Profiler(
|
||||||
msg=f'ChartView.maybe_downsample_graphics() for {self.name}',
|
msg=f'ChartView.maybe_downsample_graphics() for {self.name}',
|
||||||
disabled=not pg_profile_enabled(),
|
disabled=not pg_profile_enabled(),
|
||||||
# delayed=True,
|
|
||||||
gt=3,
|
# XXX: important to avoid not seeing underlying
|
||||||
|
# ``.update_graphics_from_flow()`` nested profiling likely
|
||||||
|
# due to the way delaying works and garbage collection of
|
||||||
|
# the profiler in the delegated method calls.
|
||||||
|
delayed=False,
|
||||||
|
# gt=3,
|
||||||
# gt=ms_slower_then,
|
# gt=ms_slower_then,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -938,15 +942,15 @@ class ChartView(ViewBox):
|
||||||
|
|
||||||
graphics = flow.graphics
|
graphics = flow.graphics
|
||||||
|
|
||||||
use_vr = False
|
# use_vr = False
|
||||||
if isinstance(graphics, BarItems):
|
# if isinstance(graphics, BarItems):
|
||||||
use_vr = True
|
# use_vr = True
|
||||||
|
|
||||||
# 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_flow(
|
chart.update_graphics_from_flow(
|
||||||
name,
|
name,
|
||||||
use_vr=use_vr,
|
use_vr=True,
|
||||||
|
|
||||||
# gets passed down into graphics obj
|
# gets passed down into graphics obj
|
||||||
# profiler=profiler,
|
# profiler=profiler,
|
||||||
|
|
Loading…
Reference in New Issue