From be7afdaa89d6785f2c2ac1fa56e1a9baba50b94f Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Tue, 28 Jun 2022 09:43:17 -0400 Subject: [PATCH] Drop commented draft quotes-drain-loop code/idea --- piker/ui/_display.py | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/piker/ui/_display.py b/piker/ui/_display.py index 91eb89a1..d63ee17f 100644 --- a/piker/ui/_display.py +++ b/piker/ui/_display.py @@ -226,33 +226,9 @@ async def graphics_update_loop( tick_margin = 3 * tick_size chart.show() - # view = chart.view last_quote = time.time() i_last = ohlcv.index - # async def iter_drain_quotes(): - # # NOTE: all code below this loop is expected to be synchronous - # # and thus draw instructions are not picked up jntil the next - # # wait / iteration. - # async for quotes in stream: - # while True: - # try: - # moar = stream.receive_nowait() - # except trio.WouldBlock: - # yield quotes - # break - # else: - # for sym, quote in moar.items(): - # ticks_frame = quote.get('ticks') - # if ticks_frame: - # quotes[sym].setdefault( - # 'ticks', []).extend(ticks_frame) - # print('pulled extra') - - # yield quotes - - # async for quotes in iter_drain_quotes(): - ds = linked.display_state = DisplayState(**{ 'quotes': {}, 'linked': linked, @@ -297,6 +273,7 @@ async def graphics_update_loop( # chart isn't active/shown so skip render cycle and pause feed(s) if chart.linked.isHidden(): + print('skipping update') chart.pause_all_feeds() continue @@ -479,7 +456,6 @@ def graphics_update_cycle( ): chart.update_graphics_from_flow( chart.name, - # do_append=uppx < update_uppx, do_append=do_append, )