`qiskit.IBMQ.load_account()` is very slow
singular-value opened this issue · 2 comments
singular-value commented
Information
- Qiskit IBMQ Provider version: 0.17.4
- Python version: 3.8
- Operating system: macOS Big Sur
What is the current behavior?
qiskit.IBMQ.load_account()
is very slow, taking 7-12 seconds typically.
First few lines of profiling output below:
105441 function calls (105130 primitive calls) in 10.533 seconds
Ordered by: internal time
ncalls tottime percall cumtime percall filename:lineno(function)
94 9.968 0.106 9.968 0.106 {method 'read' of '_ssl._SSLSocket' objects}
8 0.122 0.015 0.122 0.015 {method 'do_handshake' of '_ssl._SSLSocket' objects}
8 0.110 0.014 0.110 0.014 {method 'load_verify_locations' of '_ssl._SSLContext' objects}
8 0.088 0.011 0.088 0.011 {method 'connect' of '_socket.socket' objects}
9 0.051 0.006 0.051 0.006 decoder.py:343(raw_decode)
9 0.011 0.001 0.011 0.001 {built-in method _scproxy._get_proxy_settings}
8 0.010 0.001 0.010 0.001 {built-in method _socket.getaddrinfo}
23 0.009 0.000 0.034 0.001 backendconfiguration.py:856(_parse_channels)
3 0.007 0.002 0.008 0.003 connectionpool.py:479(close)
Steps to reproduce the problem
Run qiskit.IBMQ.load_account()
locally.
What is the expected behavior?
Although the function requires Network I/O, I can't see why it should take 10 seconds.
Suggested solutions
No suggestions unfortunately.
jyu00 commented
Reopen because #969 doesn't actually lazy load the providers:
IBMQ.load_account()
calls _initialize_providers()
, and each AccountProvider.__init__()
creates an IBMQBackendService
, which calls _discover_backends()
that initializes all backends.
rathishcholarajan commented
Issue moved to Qiskit-Partners/qiskit-ibm #84 via ZenHub