From 49ca743e6a71aa8e6db59e9128667f6c7f209517 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Mon, 23 Jan 2023 15:28:16 -0500 Subject: [PATCH] Add back `.prepareGeometryChange()`, seems faster? --- piker/ui/_dataviz.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/piker/ui/_dataviz.py b/piker/ui/_dataviz.py index a024b3b5..0b40fd8d 100644 --- a/piker/ui/_dataviz.py +++ b/piker/ui/_dataviz.py @@ -342,7 +342,7 @@ class Viz(msgspec.Struct): # , frozen=True): ''' name = self.name profiler = Profiler( - msg=f'{name} -> `{str(self)}.maxmin()`', + msg=f'`Viz[{name}].maxmin()`', disabled=not pg_profile_enabled(), ms_threshold=4, delayed=True, @@ -857,15 +857,15 @@ class Viz(msgspec.Struct): # , frozen=True): # array_key, # index_field=self.index_field, # ) - graphics.update() - profiler('.update()') - # TODO: does this actuallly help us in any way (prolly should # look at the source / ask ogi). I think it avoid artifacts on # wheel-scroll downsampling curve updates? # TODO: is this ever better? - # graphics.prepareGeometryChange() - # profiler('.prepareGeometryChange()') + graphics.prepareGeometryChange() + profiler('.prepareGeometryChange()') + + graphics.update() + profiler('.update()') # track downsampled state self._in_ds = r._in_ds