-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize OverviewPage::updateTransactions()
For wallets with a very large number of transactions, the filter->setLimit(numItems) is extremely expensive... on the order of a few seconds, because it also resorts the list if sort is defined (and it is). This simply stores the number of rows required for the overview page in the filter, and only calls setLimit if the number of rows is changed with a resize, etc. beyond a reasonable point (3x on purpose). Instead the ui->listTransactions->setRowHidden function is called in a for loop that dynamically sets the rows hidden that are not displayable between the actual display limit and the setLimit value (which is sized initially 3x the number of rows displayable). This eliminates the delay when flipping back and forth between the overview and the send, receive, or transaction views. It also improves the resize of the window. I have picked scaling parameters on the size of getLimit versus the number of rows displayable that should minimize or eliminate GUI freezes under normal window resizing. The wallet still does a list resort every time a block is received, because the underlying wallet model is updated, so that will still cause a GUI freeze for wallets with a large number of transactions. (Note that I am talking about 40000+ transactions.) This cannot be fixed without a major overhaul architecturally.
- Loading branch information
1 parent
f023319
commit 93d3e39
Showing
5 changed files
with
48 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters