[Python-Dev] PyCharm debugger became 40x faster on Python 3.6 thanks to PEP 523
Brett Cannon
brett at python.org
Sat Mar 25 15:41:07 EDT 2017
On Sat, 25 Mar 2017 at 05:58 Serhiy Storchaka <storchaka at gmail.com> wrote:
> On 25.03.17 12:04, Victor Stinner wrote:
> >
> https://blog.jetbrains.com/pycharm/2017/03/inside-the-debugger-interview-with-elizaveta-shashkova/
> >
> > "What changed in Python 3.6 to allow this?
> >
> > The new frame evaluation API was introduced to CPython in PEP 523 and it
> > allows to specify a per-interpreter function pointer to handle the
> > evaluation of frames."
> >
> > Nice!
>
> Awesome! Any chance that pdb can utilize similar technique? Or this
> doesn't make sense for pdb?
>
I guess it's possible. It probably depends on how you're using the
debugger. It sounds like PyCharm is injecting bytecode for specified
breakpoints and so I suspect the speed is only there when you press
"debug" and are not stepping through line-by-line. Getting gdb to have the
same level of sophistication might not be too bad as long as you keep the
hook simple and you're okay injected new bytecode just before a frame
begins execution.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20170325/674d71e6/attachment.html>
More information about the Python-Dev
mailing list