decorate some methods with @profiler to debug slow startup
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user