piker/piker
Tyler Goodlet 49227b6e57 Process framed ticks by type in main graphics loop
We are already packing framed ticks in extended lists from
the `.data._sampling.uniform_rate_send()` task so the natural solution
to avoid needless graphics cycles for HFT-ish feeds (like binance) is
to unpack those frames and for most cases only update graphics with the
"latest" data per loop iteration. Unpacking in this way also lessens
nested-iterations per tick type.

Btw, this also effectively solves all remaining issues of fast tick
feeds over-triggering the graphics loop renders as long as the original
quote stream is throttled appropriately, usually to the local display
rate.

Relates to #183, #192

Dirty deats:
- drop all per-tick rate checks, they were always somewhat pointless
  when iterating a frame of ticks per render cycle XD.
- unpack tick frame into ticks per frame type, and last of each type;
  the lasts are used to update each part of the UI/graphics by class.
- only skip the label update if we can't retrieve the last from from a
  graphics source array; it seems `chart.update_curve_from_array()`
  already does a `len` check internally.
- add some draft commented code for tick type classes and a possible
  wire framed tick data structure.
- move `chart_maxmin()` range computer to module level, bind a chart to
  it with a `partial.`
- only check rate limits in main quote loop thus reporting actual
  overages
- add in commented logic for only updating the "last" cleared price from
  the most recent framed value if we want to eventually (right now seems
  like this is only relevant to ib and it's dark trades: `utrade`).
- rename `_clear_throttle_rate` -> `_quote_throttle_rate`, drop
  `_book_throttle_rate`.
2021-11-03 09:09:02 -04:00
..
brokers Wait for a last price tick before delivering quote 2021-10-29 09:31:06 -04:00
clearing Add some type annots around pp msg handling 2021-11-03 08:58:44 -04:00
cli Move config module to top level 2021-09-06 21:26:28 -04:00
data Revert to old shm "last" meaning last row 2021-11-01 13:28:57 -04:00
fsp Drop old bps from fsp engine 2021-11-01 13:28:57 -04:00
testing Import client for now until we make a proper shim 2018-02-12 10:35:54 -05:00
ui Process framed ticks by type in main graphics loop 2021-11-03 09:09:02 -04:00
watchlists Add license headers to pertinent files 2020-11-06 12:23:14 -05:00
__init__.py Reminder to remove msgpack-numpy 2021-05-24 12:20:48 -04:00
_cacheables.py No longer feed specific 2021-09-06 09:28:11 -04:00
_daemon.py Switch imports to new `tractor.trionics` subpkg 2021-11-01 13:22:23 -04:00
_profile.py Add a pyqtgraph profiling toggle to chart CLI 2020-12-29 18:05:36 -05:00
calc.py Add `puterize()` 2021-09-21 15:48:40 -04:00
config.py Append paper account last when loading 2021-09-10 11:35:30 -04:00
log.py Add license headers to pertinent files 2020-11-06 12:23:14 -05:00