mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-23 17:47:31 +00:00
decorate some methods with @profiler to debug slow startup
This commit is contained in:
parent
4d62963efe
commit
eba97f74b4
2 changed files with 5 additions and 2 deletions
|
@ -37,7 +37,7 @@ from .jsonrpc import VerifyingJSONRPCServer
|
||||||
from .version import ELECTRUM_VERSION
|
from .version import ELECTRUM_VERSION
|
||||||
from .network import Network
|
from .network import Network
|
||||||
from .util import (json_decode, DaemonThread, print_error, to_string,
|
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 .wallet import Wallet, Abstract_Wallet
|
||||||
from .storage import WalletStorage
|
from .storage import WalletStorage
|
||||||
from .commands import known_commands, Commands
|
from .commands import known_commands, Commands
|
||||||
|
@ -121,6 +121,7 @@ def get_rpc_credentials(config: SimpleConfig) -> Tuple[str, str]:
|
||||||
|
|
||||||
class Daemon(DaemonThread):
|
class Daemon(DaemonThread):
|
||||||
|
|
||||||
|
@profiler
|
||||||
def __init__(self, config: SimpleConfig, fd=None, *, listen_jsonrpc=True):
|
def __init__(self, config: SimpleConfig, fd=None, *, listen_jsonrpc=True):
|
||||||
DaemonThread.__init__(self)
|
DaemonThread.__init__(self)
|
||||||
self.config = config
|
self.config = config
|
||||||
|
|
|
@ -43,7 +43,7 @@ from electrum.i18n import _, set_language
|
||||||
from electrum.plugin import run_hook
|
from electrum.plugin import run_hook
|
||||||
from electrum.storage import WalletStorage
|
from electrum.storage import WalletStorage
|
||||||
from electrum.base_wizard import GoBack
|
from electrum.base_wizard import GoBack
|
||||||
from electrum.util import (UserCancelled, PrintError,
|
from electrum.util import (UserCancelled, PrintError, profiler,
|
||||||
WalletFileException, BitcoinException)
|
WalletFileException, BitcoinException)
|
||||||
|
|
||||||
from .installwizard import InstallWizard
|
from .installwizard import InstallWizard
|
||||||
|
@ -85,6 +85,7 @@ class QNetworkUpdatedSignalObject(QObject):
|
||||||
|
|
||||||
class ElectrumGui(PrintError):
|
class ElectrumGui(PrintError):
|
||||||
|
|
||||||
|
@profiler
|
||||||
def __init__(self, config, daemon, plugins):
|
def __init__(self, config, daemon, plugins):
|
||||||
set_language(config.get('language'))
|
set_language(config.get('language'))
|
||||||
# Uncomment this call to verify objects are being properly
|
# Uncomment this call to verify objects are being properly
|
||||||
|
@ -190,6 +191,7 @@ class ElectrumGui(PrintError):
|
||||||
self.network_updated_signal_obj)
|
self.network_updated_signal_obj)
|
||||||
self.nd.show()
|
self.nd.show()
|
||||||
|
|
||||||
|
@profiler
|
||||||
def create_window_for_wallet(self, wallet):
|
def create_window_for_wallet(self, wallet):
|
||||||
w = ElectrumWindow(self, wallet)
|
w = ElectrumWindow(self, wallet)
|
||||||
self.windows.append(w)
|
self.windows.append(w)
|
||||||
|
|
Loading…
Add table
Reference in a new issue