Skip to content

Commit

Permalink
Merge #6457: fix(qt): improve GUI responsiveness for huge wallets
Browse files Browse the repository at this point in the history
a4378fc fix(qt): emit dataChanged for the whole model in TransactionTableModel (UdjinM6)

Pull request description:

  ## Issue being fixed or feature implemented
  Somehow a 500k+ txes wallet is MUCH more responsive with this patch. I'm not sure if it's macos only or not though, pls test.

  ## What was done?

  ## How Has This Been Tested?
  Run a wallet with 100k+ txes in it and send a tx or try changing units.

  ## Breaking Changes

  ## Checklist:
  - [ ] I have performed a self-review of my own code
  - [ ] I have commented my code, particularly in hard-to-understand areas
  - [ ] I have added or updated relevant unit/integration/functional/e2e tests
  - [ ] I have made corresponding changes to the documentation
  - [ ] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

ACKs for top commit:
  knst:
    ACK a4378fc
  PastaPastaPasta:
    utACK a4378fc

Tree-SHA512: eb0116f99f145ee131bd4a69895c9384dc26fc113ee034a2af74a92b0770b33631455a79e5826dc004f922ac182481eb26c54255274e186a47da3796da9550a6
  • Loading branch information
PastaPastaPasta committed Dec 9, 2024
2 parents ff1ddc9 + a4378fc commit babafbb
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/qt/transactiontablemodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -314,10 +314,7 @@ void TransactionTableModel::updateAddressBook(const QString& address, const QStr
void TransactionTableModel::updateConfirmations()
{
// Blocks came in since last poll.
// Invalidate status (number of confirmations) and (possibly) description
// for all rows. Qt is smart enough to only actually request the data for the
// visible rows.
Q_EMIT dataChanged(index(0, Status), index(priv->size()-1, Status));
Q_EMIT dataChanged(QModelIndex(), QModelIndex());
}


Expand Down Expand Up @@ -799,7 +796,7 @@ void TransactionTableModel::updateDisplayUnit()
{
// emit dataChanged to update Amount column with the current unit
updateAmountColumnTitle();
Q_EMIT dataChanged(index(0, Amount), index(priv->size()-1, Amount));
Q_EMIT dataChanged(QModelIndex(), QModelIndex());
}

void TransactionTablePriv::NotifyTransactionChanged(const uint256 &hash, ChangeType status)
Expand Down

0 comments on commit babafbb

Please sign in to comment.