[Qt] Call checkBalanceChanged() periodically instead for every updated tx #4712

pull cozz wants to merge 1 commits into bitcoin:master from cozz:cozz11 changing 2 files +12 −7
  1. cozz commented at 1:26 am on August 17, 2014: contributor

    checkBalanceChanged() is quite expensive on larger wallets as we loop mapWallet several times for each balance-type.

    There already is a periodical function pollBalanceChanged(). So instead of calling checkBalanceChanged() for each updated transaction, set a flag fForceCheckBalanceChanged, which forces pollBalanceChanged() to check the balance on the next run.

    For example importaddress mvqaxopu9Uef2qjXSV3fGrp6DcEYnCoYWK adds like 20000 transactions to the wallet. This means after rescan currently we loop mapWallet 120000 times, just to check the balance, which causes 100% cpu for a while.

    Unrelated change: Move showProgress signal after the QueueProcessing, so that the progressbar is still shown, while the 20000 txs get added to the GUI.

  2. laanwj added the label Wallet on Aug 18, 2014
  3. laanwj commented at 8:15 am on August 18, 2014: member
    Untested ACK
  4. cozz force-pushed on Aug 25, 2014
  5. [Qt] Call checkBalanceChanged() periodically instead for every updated transaction 80daee0fb5
  6. cozz force-pushed on Aug 26, 2014
  7. BitcoinPullTester commented at 5:37 pm on August 26, 2014: none
    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/p4712_80daee0fb585762d303503f32f8efa0e625f152f/ for binaries and test log. This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ Contact BlueMatt on freenode if something looks broken.
  8. dgenr8 commented at 4:43 pm on September 5, 2014: contributor
    Untested ACK
  9. laanwj merged this on Sep 8, 2014
  10. laanwj closed this on Sep 8, 2014

  11. laanwj referenced this in commit bb4ef1e9dc on Sep 8, 2014
  12. wtogami referenced this in commit 074f4d59ce on Sep 9, 2014
  13. wtogami referenced this in commit e045a13b02 on Sep 19, 2014
  14. wtogami referenced this in commit 009c59433f on Oct 2, 2014
  15. wtogami referenced this in commit fccb9aab76 on Nov 14, 2014
  16. wtogami referenced this in commit 405a1616e3 on Dec 23, 2014
  17. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-10-05 01:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me