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
|
@ -20,7 +20,6 @@ Chart view box primitives
|
|||
"""
|
||||
from __future__ import annotations
|
||||
from contextlib import asynccontextmanager
|
||||
# import itertools
|
||||
import time
|
||||
from typing import Optional, Callable
|
||||
|
||||
|
@ -907,17 +906,22 @@ class ChartView(ViewBox):
|
|||
def maybe_downsample_graphics(self):
|
||||
|
||||
uppx = self.x_uppx()
|
||||
if not (
|
||||
# we probably want to drop this once we are "drawing in
|
||||
# view" for downsampled flows..
|
||||
uppx and uppx > 6
|
||||
and self._ic is not None
|
||||
):
|
||||
# if not (
|
||||
# # we probably want to drop this once we are "drawing in
|
||||
# # view" for downsampled flows..
|
||||
# uppx and uppx > 6
|
||||
# and self._ic is not None
|
||||
# ):
|
||||
profiler = pg.debug.Profiler(
|
||||
msg=f'ChartView.maybe_downsample_graphics() for {self.name}',
|
||||
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,
|
||||
)
|
||||
|
||||
|
@ -938,15 +942,15 @@ class ChartView(ViewBox):
|
|||
|
||||
graphics = flow.graphics
|
||||
|
||||
use_vr = False
|
||||
if isinstance(graphics, BarItems):
|
||||
use_vr = True
|
||||
# use_vr = False
|
||||
# if isinstance(graphics, BarItems):
|
||||
# use_vr = True
|
||||
|
||||
# pass in no array which will read and render from the last
|
||||
# passed array (normally provided by the display loop.)
|
||||
chart.update_graphics_from_flow(
|
||||
name,
|
||||
use_vr=use_vr,
|
||||
use_vr=True,
|
||||
|
||||
# gets passed down into graphics obj
|
||||
# profiler=profiler,
|
||||
|
|
Loading…
Reference in New Issue