Commit 2b2ca23
committed
qt: don't refresh invoice list per invoice_status event while syncing
Each invoice_status event makes InvoiceList.refresh_item recompute the
invoice status, which scans prevouts, on the GUI thread. While the
wallet is syncing these events arrive in bulk - one per touched
invoice per tx addition - so a wallet with many invoices sharing a
destination scriptpubkey freezes the GUI for the duration of the sync
(observed via py-spy: the GUI thread inside _is_onchain_invoice_paid
under refresh_item, while the event loop thread ran a detection pass).
While not up_to_date, just set need_update: update_wallet() already
defers update_tabs() until is_up_to_date(), and then rebuilds the
invoice list once, in one batch.1 parent 9791dbc commit 2b2ca23
1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1387 | 1387 | | |
1388 | 1388 | | |
1389 | 1389 | | |
| 1390 | + | |
| 1391 | + | |
| 1392 | + | |
| 1393 | + | |
| 1394 | + | |
| 1395 | + | |
1390 | 1396 | | |
1391 | 1397 | | |
1392 | 1398 | | |
| |||
0 commit comments