Thursday, January 14, 2016

PyDev 4.5.1: debug faster

PyDev 4.5.1 brings niceties such as an improvement on the code-completion so that properties declared with @property no longer show arguments parenthesis and Ctrl+1 can be used inside a bracketed statement to wrap/unwrap its contents over multiple lines (thanks to yohell). Also, the refactoring, parsing and search had some fixes, but the major changes were in the debugger.

The debugger is much faster and has optional Cython modules for even additional speedups.

In short, the debugger is overall 40% faster without Cython and 138% faster with Cython in the benchmarks created -- although in real world cases I expect even better gains as the benchmarks were done for the cases where the debugger has more overhead than usual.

Graphs with more details on the improvements may be seen at: (performance results with cython). (performance results without cython).

Also, the debugger backend is now also available through "pip install pydevd" (, so, it's easier to setup the remote debugging in a different machine (note that users shouldn't need to install the debugger, only if doing a remote debugging session).

As a note, I'd like to thank JetBrains, which helped on sponsoring the performance improvements in the PyDev Debugger (as it's also the debugger backend used by PyCharm).

For LiClipse users, 2.5.1 (just released too) includes the latest PyDev.


Luke Codewalker said...

This sounds great but I'm a bit confused by the CPython reference (I am aware of what it though I have not used it). Should we install Cypython and then automagically get 138% or what are steps please? Would love to get such a speedup on debug!
Or maybe you mean only if our own code is in CPython?

Fabio Zadrozny said...

It's not CPython reference but "Cython": (so, the debugger has a speedup module compiled with Cython to speed up the debugger) -- so, you don't have to do anything on your own code except compile the cython code (if you're on Linux/Mac OS -- for Windows pre-compiled modules are provided for Python 2.7, 3.4 and 3.5) -- a warning with the step you have to take is printed on screen if you have to take any steps.

Luke Codewalker said...

Doh, yes Cython.
I did "pip install cython". Which worked. Do I need to do more? I am on python 2.7
Thanks for any further guidance.

Luke Codewalker said...

I am on windows (noticed your pre-compiled modules reference.. but still not quite sure what to do :-( )
One of your backers too BTW :-)

Fabio Zadrozny said...

You don't need to do anything if you're on windows with python 2.7, 3.4 or 3.5 (the speedups are already provided and the debugger will use them automatically).

Luke Codewalker said...

Thanks! Really appreciated

OOPMan said...

Does the improved debugger perform any faster than the baseline under PyPy?

Fabio Zadrozny said...

Yes, although I haven't profiled it, as the regular python version is faster, PyPy should also be faster even without the cython speedups.