-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Closed
Labels
Description
The comment here is not entirely correct:
bitcoin/src/qt/walletmodel.cpp
Lines 71 to 74 in 4bfef0d
// Try to get balances and return early if locks can't be acquired. This | |
// avoids the GUI from getting stuck on periodical polls if the core is | |
// holding the locks for a longer time - for example, during a wallet | |
// rescan. |
The problem happens when the locks are held and calculating the balance takes a lot of time - causing the GUI to stuck.
Beside the obvious improvement - drop polling and update only when necessary - the actual balance calculation must be asynchronous otherwise Qt's event loop isn't able to make the GUI smooth - noticeable on big wallet. This also applies for anything that takes a lot - whether it requires other locks or not.
darosior, hebasto and decryp2kanon