6

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?

4

1 回答 1

6

问题是铁蟒。显然,ipy 不适用于调试器。我使用相同的调试器(eclipse pydev、pycharm、visual studio)再次运行 pystone,但这次使用的是常规的 python 发行版而不是 ironpython。结果好多了:

使用标准 python 正常运行:

Pystone(1.1) time for 50000 passes = 0.462739
This machine benchmarks at 108052 pystones/second

使用标准 python 调试运行:

pydev debugger: starting
Pystone(1.1) time for 50000 passes = 4.49224
This machine benchmarks at 11130.3 pystones/second

因此,似乎常规 python 在调试模式下仍然会出现明显的减速,但与 Ironpython 所经历的减速相比没有什么。如果你遇到这个问题,你可能会考虑转储 Ironpython。

于 2013-11-05T20:32:33.133 回答