-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Finer-grained UI updates, move UI interface to boost::signals #1205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Finer-grained UI updates, move UI interface to boost::signals #1205
Conversation
|
I looked around in your changes and there is much code in, I can't really say anything to most parts ^^. Does it compile fine on Windows? This takes more time for me to check this, sorry. |
|
It mostly needs sanity testing. The code should compile find on windows, as there's no OS specific changes. There should be no user-visible changes to behaviour (except for the small fixed problems) but this improves efficiency, prepares for multiple-wallet support and makes it easier to split the UI into a separate process at some point. |
|
This should help with lowering the current CPU usage of utilizing a full core, while initial block chain download is in progress, right? Is this an issue on non-Windows versions, too and have you verified this? |
|
Well, this is not really meant as a performance fix, although it probably has that effect. AFAIK there are no pressing UI performance issues in 0.6.2. The idea is to further formalize the interface between the UI and the core. Instead of a sledgehammer "mainFrameRepaint" event, the UI gets messages such as AddressBookChanged, TransactionChanged that tell the UI directly what has changed, so it can update its internal model (and display) without further checks. This has a positive effect on performance and lock contention. Eventually I want to remove all locks and direct access in the UI to the core memory space, and handle everything through function calls. This is much safer, and from that point, it is easy(ish) to completely separate the processes by using message passing. |
|
ACK on changed to core |
|
test_bitcoin fails to link: |
|
Fix for test_bitcoin issue in 315fa37 |
src/ui_interface.h
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
http://msdn.microsoft.com/en-us/library/windows/desktop/ms647581(v=vs.85).aspx
MF_HELP = 0x00004000L -- Indicates that the menu item has a vertical separator to its left.
|
Thanks for testing sipa and luke-jr. I've pushed a commit that should resolve the test build and windows build issues. |
Gets rid of `MainFrameRepaint` in favor of specific update functions that tell the UI exactly what changed. This improves the efficiency of various handlers. Also fixes problems with mined transactions not showing up until restart. The following notifications were added: - `NotifyBlocksChanged`: Block chain changed - `NotifyKeyStoreStatusChanged`: Wallet status (encrypted, locked) changed. - `NotifyAddressBookChanged`: Address book entry changed. - `NotifyTransactionChanged`: Wallet transaction added, removed or updated. - `NotifyNumConnectionsChanged`: Number of connections changed. - `NotifyAlertChanged`: New, updated or cancelled alert. As this finally makes it possible for the UI to know when a new alert arrived, it can be shown as OS notification. These notifications could also be useful for RPC clients. However, currently, they are ignored in bitcoind (in noui.cpp). Also brings back polling with timer for numBlocks in ClientModel. This value updates so frequently during initial download that the number of signals clogs the UI thread and causes heavy CPU usage. And after initial block download, the value changes so rarely that a delay of half a second until the UI updates is unnoticable.
- Signals now go directly from the core to WalletModel/ClientModel. - WalletModel subscribes to signals on CWallet: Prepares for multi-wallet support, by no longer assuming an implicit global wallet. - Gets rid of noui.cpp, the few lines that were left are merged into init.cpp - Rename wxXXX message flags to MF_XXX, to make them UI indifferent. - ThreadSafeMessageBox no longer returns the value `4` which was never used, converted to void.
- No longer invalidates selection model, thus retains selection on address book changes - Fixes selection of new address when added
Finer-grained UI updates, move UI interface to boost::signals
…ications Finer-grained UI updates, move UI interface to boost::signals
* Fix deletion time bug * Only set deletion time if it has not already been set
Fix leak in getblocktemplate
b578675 [Cleanup] Remove unnecessary QtCreator files (Fuzzbawls) Pull request description: We don't need to be including these IDE files in the source repo ACKs for top commit: random-zebra: utACK b578675 furszy: utACK b578675 Warrows: ACK b578675 Tree-SHA512: 8d14634ef9e62291242c9a7ee2c4e0b680233980389e077dfdbdb4bf546dddefcb0da99d664153ca2144039e6938341d73ede868abe5432345edd3ef011d3fcb
Gets rid of
MainFrameRepaintin favor of specific update functions that tell the UI exactly what changed.The following notifications were added:
NotifyBlocksChanged: Block chain changedNotifyKeyStoreStatusChanged: Wallet status (encrypted, locked) changed.NotifyAddressBookChanged: Address book entry changed.NotifyTransactionChanged: Wallet transaction added, removed or updated.NotifyNumConnectionsChanged: Number of connections changed.NotifyAlertChanged: New, updated or cancelled alert.These notifications could also be useful for RPC clients. However, currently, they are ignored in bitcoind.
Also brings back polling with timer for numBlocks in ClientModel. This value updates so frequently during initial download that the number of signals clogs the UI thread and causes heavy CPU usage. And after initial block download, the value changes so rarely that a delay of half a second until the UI updates is unnoticable.
Second commit converts UI interface to boost::signals:
4which was never used