qt: avoid unchanged wallet list rebuilds#10645
Conversation
9ca85d0 to
22769c2
Compare
|
Follow-up pushed: 22769c2. The first CI run exposed that the new Qt GUI test needed an explicit headless Qt platform when run inside the full Cirrus test suite. I added Re-ran locally after the update:
Still AI-assisted and manually reviewed/tested. |
22769c2 to
105c5bb
Compare
|
Follow-up pushed: 7c5a11f. This now covers two focused large-wallet list refresh paths:
Re-ran locally after the update:
Synthetic measurements:
Still intentionally scoped as a partial improvement for #6625, and still AI-assisted / manually reviewed and tested. CI status after the follow-up push: all required checks are now green on 7c5a11f, including Regtest functional tests. |
105c5bb to
7c5a11f
Compare
|
Follow-up pushed: 33521ca. This adds the History tab no-op refresh path to the same large-wallet performance scope:
Re-ran locally:
Synthetic measurement with 5000 fake transactions:
Still scoped as a partial improvement for #6625, and still AI-assisted / manually reviewed and tested. CI status after the follow-up push: all required checks are now green on 33521ca, including Regtest functional tests. |
This reduces UI rebuild work related to #6625 in three focused wallet-list paths.
The previous code already deferred many hidden tree-view updates, but large wallets could still pay expensive Qt model rebuild costs in common refresh paths:
get_full_history()returned the same wallet-derived data already displayed. This branch now keeps the existing model when the history rows are unchanged, while still rebuilding when labels, amounts, confirmations, fiat data, ordering, or row count change. It also fixes the remove/insert row bounds around empty history refreshes and preserves row-0 reselection.UTXOList.update()intentionally skippedmaybe_defer_update()so the coin-control status bar stayed accurate. That also meant a hidden Coins tab still cleared and rebuilt every UTXO row. This branch keeps the cheap bookkeeping path current while hidden, marks the view for a deferred repaint, and only rebuilds the Qt model when shown or forced.This is intentionally scoped as a partial improvement for heavy-wallet freeze paths, not a claim that every case in #6625 is solved.
Validation:
.venv/bin/python -m pytest tests/gui/test_qt_history_list.py tests/gui/test_qt_address_list.py tests/gui/test_qt_utxo_list.py tests/qml/test_qml_qeconfig.py tests/test_storage_upgrade.py -q-> 68 passedgit diff --check.venv/bin/python -m compileall -q electrum/gui/qt/history_list.py tests/gui/test_qt_history_list.py.venv/bin/python -m compileall -q electrum/gui/qt/address_list.py electrum/gui/qt/utxo_list.py tests/gui/test_qt_address_list.py tests/gui/test_qt_utxo_list.pySynthetic benchmarks:
HistoryModel.refresh()median: 0.6553763750707731sHistoryModel.refresh()median: 0.009829916059970856sUTXOList.update()median: baseline 0.5189501660643145s -> this branch 0.001451167045161128sAddressList.update()median on this branch: 0.00339225004427135sThis PR was AI-assisted, then manually reviewed and tested with the commands above.