Closed tangkong closed 10 months ago
Crash:
RE: crash
I went through earlier and replaced functions-defined-in-functions with WeakPartialMethodSlot, but didn't do the same for functions passed to QThreads. I wonder if making those functions proper methods would help there.
A realization about Ken's crash: the segfault is happening in an Edit widget, while SetValueStep has as unique run-widget. The edit-widget should not be invoked. (Past me left a TODO I see...)
Edit: fixing the logic removes the crash. Basically the edit widget was created then orphaned, while a specific Run PageWidget was created and displayed instead. That orphaned widget got cleaned up while ophyd threads were running.
Interesting I didn't run into this before, but forward progress is progress
After some "memory profiling" with top and the huge config, PVConfigurationPage's with many sub-comparisons still take prohibitively long to load, likely due to having to load all the row widgets in the comparison table. This will be an issue for other ConfigurationGorup pages, and is seen in other apps like the pmps-ui.
External to the effort, investigating paginated table layouts is worthwhile. Alternately, using native Qt widgets may be helpfule, but prevent us from doing all these snazzy things
Thanks everyone. Shipping this off
Description
This is going to be a doozy. This has the simple goal of lazily loading
PageWidgets
, and the not-so-simple reality of rewriting most of said widgets.A high-level list of things I did
EditTree
andRunTree
into a singleDualTree
AtefItem
(QTreeWidgetItem) withTreeItem, for use in a
QTreeViewwith
ConfigTreeModel` (a tree model with status icons)PageWidgets
QDataclassBridge
instances to theTreeItem
DualTree
to load widgets lazilyMotivation and Context
(#222) One user programmatically generated a checkout with 3000 comparisons, and the GUI failed to load it. It attempted to, but way ATEF is structured every single widget had to be loaded.
Briefly, the previous functionality was:
To accomplish this we have to extricate the tree logic from the widgets.
A key requirement is that each widget must be loadable at any point by selecting its tree item.
TreeItem
.Because widgets always existed, it was natural to tie the QDataclassBridges to the widgets. As such any update behavior/callbacks need to access widgets (that now may not exist). I think it makes the most sense here to move the bridges to the
TreeItem
, and base behavior on that. (this was quite disruptive)PageWidget
s now need the tree at init-time (compared to the previous additionalassign_tree_items
stepassign_tree_items
outside of__init__
. I've also changed the name to more accurately reflect its use.DualTree
How Has This Been Tested?
Test suite runs, but mostly interactively. Perhaps I need to expand the test suite more...
Where Has This Been Documented?
Verbosely in this PR, as I always do
Pre-merge checklist
docs/pre-release-notes.sh
and created a pre-release documentation page