aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2018-08-13 15:01:07 -0400
committerMarcoFalke <falke.marco@gmail.com>2018-08-13 15:02:38 -0400
commitddc3ec92b0e655a3da21ac2e85ec2e7ecb66c65b (patch)
treee446883baf2424095ce0ad1a936d6d26c3a5cb9c /src/init.cpp
parentf87d0a9d75b366445f880041c56c725f8196364e (diff)
parentfa5ce27385bc60cdf6d9a4eeb2d32c916c9e07eb (diff)
downloadbitcoin-ddc3ec92b0e655a3da21ac2e85ec2e7ecb66c65b.tar.xz
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
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/init.cpp b/src/init.cpp
index 482107c06f..2131a6adc0 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -328,12 +328,12 @@ static void registerSignalHandler(int signal, void(*handler)(int))
static void OnRPCStarted()
{
- uiInterface.NotifyBlockTip.connect(&RPCNotifyBlockChange);
+ uiInterface.NotifyBlockTip_connect(&RPCNotifyBlockChange);
}
static void OnRPCStopped()
{
- uiInterface.NotifyBlockTip.disconnect(&RPCNotifyBlockChange);
+ uiInterface.NotifyBlockTip_disconnect(&RPCNotifyBlockChange);
RPCNotifyBlockChange(false, nullptr);
g_best_block_cv.notify_all();
LogPrint(BCLog::RPC, "RPC stopped.\n");
@@ -1287,7 +1287,7 @@ bool AppInitMain()
*/
if (gArgs.GetBoolArg("-server", false))
{
- uiInterface.InitMessage.connect(SetRPCWarmupStatus);
+ uiInterface.InitMessage_connect(SetRPCWarmupStatus);
if (!AppInitServers())
return InitError(_("Unable to start HTTP server. See debug log for details."));
}
@@ -1644,13 +1644,13 @@ bool AppInitMain()
// Either install a handler to notify us when genesis activates, or set fHaveGenesis directly.
// No locking, as this happens before any background thread is started.
if (chainActive.Tip() == nullptr) {
- uiInterface.NotifyBlockTip.connect(BlockNotifyGenesisWait);
+ uiInterface.NotifyBlockTip_connect(BlockNotifyGenesisWait);
} else {
fHaveGenesis = true;
}
if (gArgs.IsArgSet("-blocknotify"))
- uiInterface.NotifyBlockTip.connect(BlockNotifyCallback);
+ uiInterface.NotifyBlockTip_connect(BlockNotifyCallback);
std::vector<fs::path> vImportFiles;
for (const std::string& strFile : gArgs.GetArgs("-loadblock")) {
@@ -1668,7 +1668,7 @@ bool AppInitMain()
while (!fHaveGenesis && !ShutdownRequested()) {
condvar_GenesisWait.wait_for(lock, std::chrono::milliseconds(500));
}
- uiInterface.NotifyBlockTip.disconnect(BlockNotifyGenesisWait);
+ uiInterface.NotifyBlockTip_disconnect(BlockNotifyGenesisWait);
}
if (ShutdownRequested()) {