importin `ipdb` is much slower than importing `pdb`
See original GitHub issueI observe that importing ipdb
takes much longer time than pdb
almost 120 times on my end. During testing this will increase time to lose for each starting session.
What may be the reason for this (is it a normal case)? Is there any way to make it faster to import ipdb
- importing
ipdb
(ipdb==0.13.3
)
0.60s user 0.09s system 90% cpu 0.754 total
- importing
ipdb
0.05s user 0.01s system 97% cpu 0.062 total
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
python - Update a function during debugging (pdb or ipdb)
Imagine I am debugging the following script: import ipdb def slow_function( ...
Read more >ipdb no longer works with airflow test command #26352 - GitHub
I used to be able to use ipdb to debug DAGs by running airflow tasks test ... Add ipdb breakpoint anywhere in airflow...
Read more >ipdb - Bountysource
I observe that importing ipdb takes much longer time than pdb almost 120 times on my end. During testing this will increase time...
Read more >Does loading PDB slow down execution? - Google Groups
Hi all, If I run a python3 program with "import pdb" in the code, would it execute slower than without loading the debugger?...
Read more >Python Debugging With Pdb
By default, breakpoint() will import pdb and call pdb.set_trace() , as shown above. However, using breakpoint() is more flexible and allows you to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This is fixed by #224 which instantiates IPython lazily.
I timed with hyperfine which does repeated runs and provides statistics.
On master:
With #224 applied:
For reference here’s the import time of just
IPython
:@gotcha Done. // @adamchainz Thanks for the fixed. I never heard
hyperfine
before, its a great tool