Reputation: 7276
I am trying to use pycharm in order to debug an ironpython script. It is going poorly because pycharm is running very slowly in debug mode. I realize that we can expect some slowdown, but I am experiencing a slowdown of roughly 200x. Below are my pystone results:
Normal run:
"C:\Program Files (x86)\IronPython 2.7\ipy.exe" C:/Users/melchoir55/PycharmProjects/pystone/pystone.py
Pystone(1.1) time for 50000 passes = 0.270744
This machine benchmarks at 184676 pystones/second
Debugger:
"C:\Program Files (x86)\IronPython 2.7\ipy.exe" -X:Frames "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 3.0.1\helpers\pydev\pydevd.py" --multiproc --client 127.0.0.1 --port 52669 --file C:/Users/melchoir55/PycharmProjects/pystone/pystone.py
pydev debugger: warning: sys._current_frames is not supported in Python 2.4, it is recommended to install threadframe module
pydev debugger: warning: See http://majid.info/blog/threadframe-multithreaded-stack-frame-extraction-for-python/
pydev debugger: process 9064 is connecting
Connected to pydev debugger (build 131.339)
Pystone(1.1) time for 50000 passes = 71.5615
This machine benchmarks at 698.700 pystones/second
Anyone have any idea what might be going on here?
Upvotes: 7
Views: 8154
Reputation: 7276
The problem was ironpython. Apparently, ipy doesn't work well with debuggers. I ran pystone again using the same debuggers(eclipse pydev, pycharm, visual studio) except this time using a regular python distribution instead of ironpython. The results were much better:
Normal run with standard python:
Pystone(1.1) time for 50000 passes = 0.462739
This machine benchmarks at 108052 pystones/second
Debug run with standard python:
pydev debugger: starting
Pystone(1.1) time for 50000 passes = 4.49224
This machine benchmarks at 11130.3 pystones/second
So it appears regular python still experiences a significant slowdown in debug mode, but nothing compared to the slowdown experienced by ironpython. If you experience this problem, you might consider dumping ironpython.
Upvotes: 6