mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
Merge #13634: ui: Compile boost::signals2 only once
fa5ce27385 ui: Compile boost:signals2 only once (MarcoFalke)
Pull request description:
ui is one of the modules that poison other modules with `boost/signals2` headers. This moves the include to the cpp file and uses a forward declaration in the header.
Locally this speeds up the incremental build (building everything that uses the ui module) with gcc by ~5% for me. Gcc uses ~5% less memory.
Would be nice if someone could verify the numbers roughly.
I presume the improvements will be more pronounced if the other models would stop exposing the boost header as well.
Tree-SHA512: 078360eba330ddbca4268bd8552927eae242a239e18dfded25ec20be72650a68cd83af7ac160690249b943d33ae35d15df1313f1f60a0c28b9526853aa7d1e40
This commit is contained in:
@@ -233,44 +233,44 @@ class NodeImpl : public Node
|
||||
}
|
||||
std::unique_ptr<Handler> handleInitMessage(InitMessageFn fn) override
|
||||
{
|
||||
return MakeHandler(::uiInterface.InitMessage.connect(fn));
|
||||
return MakeHandler(::uiInterface.InitMessage_connect(fn));
|
||||
}
|
||||
std::unique_ptr<Handler> handleMessageBox(MessageBoxFn fn) override
|
||||
{
|
||||
return MakeHandler(::uiInterface.ThreadSafeMessageBox.connect(fn));
|
||||
return MakeHandler(::uiInterface.ThreadSafeMessageBox_connect(fn));
|
||||
}
|
||||
std::unique_ptr<Handler> handleQuestion(QuestionFn fn) override
|
||||
{
|
||||
return MakeHandler(::uiInterface.ThreadSafeQuestion.connect(fn));
|
||||
return MakeHandler(::uiInterface.ThreadSafeQuestion_connect(fn));
|
||||
}
|
||||
std::unique_ptr<Handler> handleShowProgress(ShowProgressFn fn) override
|
||||
{
|
||||
return MakeHandler(::uiInterface.ShowProgress.connect(fn));
|
||||
return MakeHandler(::uiInterface.ShowProgress_connect(fn));
|
||||
}
|
||||
std::unique_ptr<Handler> handleLoadWallet(LoadWalletFn fn) override
|
||||
{
|
||||
CHECK_WALLET(
|
||||
return MakeHandler(::uiInterface.LoadWallet.connect([fn](std::shared_ptr<CWallet> wallet) { fn(MakeWallet(wallet)); })));
|
||||
return MakeHandler(::uiInterface.LoadWallet_connect([fn](std::shared_ptr<CWallet> wallet) { fn(MakeWallet(wallet)); })));
|
||||
}
|
||||
std::unique_ptr<Handler> handleNotifyNumConnectionsChanged(NotifyNumConnectionsChangedFn fn) override
|
||||
{
|
||||
return MakeHandler(::uiInterface.NotifyNumConnectionsChanged.connect(fn));
|
||||
return MakeHandler(::uiInterface.NotifyNumConnectionsChanged_connect(fn));
|
||||
}
|
||||
std::unique_ptr<Handler> handleNotifyNetworkActiveChanged(NotifyNetworkActiveChangedFn fn) override
|
||||
{
|
||||
return MakeHandler(::uiInterface.NotifyNetworkActiveChanged.connect(fn));
|
||||
return MakeHandler(::uiInterface.NotifyNetworkActiveChanged_connect(fn));
|
||||
}
|
||||
std::unique_ptr<Handler> handleNotifyAlertChanged(NotifyAlertChangedFn fn) override
|
||||
{
|
||||
return MakeHandler(::uiInterface.NotifyAlertChanged.connect(fn));
|
||||
return MakeHandler(::uiInterface.NotifyAlertChanged_connect(fn));
|
||||
}
|
||||
std::unique_ptr<Handler> handleBannedListChanged(BannedListChangedFn fn) override
|
||||
{
|
||||
return MakeHandler(::uiInterface.BannedListChanged.connect(fn));
|
||||
return MakeHandler(::uiInterface.BannedListChanged_connect(fn));
|
||||
}
|
||||
std::unique_ptr<Handler> handleNotifyBlockTip(NotifyBlockTipFn fn) override
|
||||
{
|
||||
return MakeHandler(::uiInterface.NotifyBlockTip.connect([fn](bool initial_download, const CBlockIndex* block) {
|
||||
return MakeHandler(::uiInterface.NotifyBlockTip_connect([fn](bool initial_download, const CBlockIndex* block) {
|
||||
fn(initial_download, block->nHeight, block->GetBlockTime(),
|
||||
GuessVerificationProgress(Params().TxData(), block));
|
||||
}));
|
||||
@@ -278,7 +278,7 @@ class NodeImpl : public Node
|
||||
std::unique_ptr<Handler> handleNotifyHeaderTip(NotifyHeaderTipFn fn) override
|
||||
{
|
||||
return MakeHandler(
|
||||
::uiInterface.NotifyHeaderTip.connect([fn](bool initial_download, const CBlockIndex* block) {
|
||||
::uiInterface.NotifyHeaderTip_connect([fn](bool initial_download, const CBlockIndex* block) {
|
||||
fn(initial_download, block->nHeight, block->GetBlockTime(),
|
||||
GuessVerificationProgress(Params().TxData(), block));
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user