File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,15 +22,29 @@ When you enable the debugger, it adds overhead and slows down your
2222program. The overhead is greater than pdb, because the debugger tries to
2323analyze the program in depth. In most cases, this does not diminish the
2424debugging experience. But for some instructions, the overhead can be
25- very large. For example, if you turn on the debugger and run the
25+ very large.
26+ For example, if you turn on the debugger and run the
2627\` import pandas\` instruction, it can increase your CPU to 100% for a
2728while.
29+ ::
30+
31+ $ cat tmp.py
32+ #!/usr/bin/env python3
33+ import pandas as pd
34+
35+ $ trepan3k tmp.py
36+ (trepan3k) next # that increase your CPU to 100% for a while
2837
2938The debugger overhead only concerns the instructions of the program to
3039be debugged, the instructions of the trepan3k interpreter are not
31- analyzed, so there is no overhead. For example, in trepan3k, do an
40+ analyzed, so there is no overhead.
41+ For example, in trepan3k, do an
3242\` import pandas\` and you will probably see that things are
3343instantaneous.
44+ ::
45+
46+ $ trepan3k tmp.py
47+ (trepan3k) import pandas as pd # that things are instantaneous
3448
3549Technique to reduce the overhead costs
3650~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can’t perform that action at this time.
0 commit comments