diff --git a/electrum/daemon.py b/electrum/daemon.py index a2f80c62e..ad1c2a854 100644 --- a/electrum/daemon.py +++ b/electrum/daemon.py @@ -37,7 +37,7 @@ from .jsonrpc import VerifyingJSONRPCServer from .version import ELECTRUM_VERSION from .network import Network from .util import (json_decode, DaemonThread, print_error, to_string, - create_and_start_event_loop) + create_and_start_event_loop, profiler) from .wallet import Wallet, Abstract_Wallet from .storage import WalletStorage from .commands import known_commands, Commands @@ -121,6 +121,7 @@ def get_rpc_credentials(config: SimpleConfig) -> Tuple[str, str]: class Daemon(DaemonThread): + @profiler def __init__(self, config: SimpleConfig, fd=None, *, listen_jsonrpc=True): DaemonThread.__init__(self) self.config = config diff --git a/electrum/gui/qt/__init__.py b/electrum/gui/qt/__init__.py index 75011ae77..9da968f30 100644 --- a/electrum/gui/qt/__init__.py +++ b/electrum/gui/qt/__init__.py @@ -43,7 +43,7 @@ from electrum.i18n import _, set_language from electrum.plugin import run_hook from electrum.storage import WalletStorage from electrum.base_wizard import GoBack -from electrum.util import (UserCancelled, PrintError, +from electrum.util import (UserCancelled, PrintError, profiler, WalletFileException, BitcoinException) from .installwizard import InstallWizard @@ -85,6 +85,7 @@ class QNetworkUpdatedSignalObject(QObject): class ElectrumGui(PrintError): + @profiler def __init__(self, config, daemon, plugins): set_language(config.get('language')) # Uncomment this call to verify objects are being properly @@ -190,6 +191,7 @@ class ElectrumGui(PrintError): self.network_updated_signal_obj) self.nd.show() + @profiler def create_window_for_wallet(self, wallet): w = ElectrumWindow(self, wallet) self.windows.append(w)