pikers / piker

(e2e) foss trading for non-tinas
GNU Affero General Public License v3.0
103 stars 17 forks source link

Fixing the convoluted `._set_yrange()` callbacks mess #343

Open goodboy opened 2 years ago

goodboy commented 2 years ago

Qt has messy stuff like "signals and slots" which actually provide not much benefit when used from python (since calling python from C++ doesn't often ๐Ÿ˜‚) which we originally used to fall in line with the default architecture of pyqtgraph's ViewBox.

Trying to understand how all these signals and slots fit together is a nightmare even for me who's hacked pretty hard on the core of it all and I still get confused every time i come back to the code responsible even with the recent major refactoring to our Flows abstraction layer..

This was overall a major annoyance and source of misunderstanding in recent work for solving y-range sorting performance enhancements in #342.

So what do we do to start addressing this?


high level breakdown.. of the mess

to begin groking these are notable bits in the code base to know about:


How this works going forward: TODO: fill this out!

goodboy commented 1 year ago

Soo turns out I already solved most of this without doing a writeup ๐Ÿ˜ธ

The slew of commits are here: https://github.com/pikers/piker/commits/534f96e8d7824d1e56c08705e713e136ed1ef69a/piker/ui/_interaction.py and more or less starting @ https://github.com/pikers/piker/commit/1782bb7d22fbbde548bb78822f7e78b47de14136.

Likely this change set will get factored into a more compact PR so i'll follow up if and when.

goodboy commented 1 year ago

Yeah, mostly resolved in the work from #453 and #455 ๐Ÿฅณ

goodboy commented 1 year ago

Pretty sure #455 fill finish off the rest of this since we will be entirely bypassing the whole Signal junk after that lands ๐Ÿ„๐Ÿผ