Debugging SLOW after updating to 2016.2

已回答

Hey

 

I updated to 2016.2 a few days ago, and since then everything become much more slow - especially debugging, which became almost impossible.

It takes forever to evaluate expressions and use the command line python within the debugger. Also, it sometimes just freeze/hang.

I'm doing some basic numpy/scipy/pandas data analysis, nothing special (running on Ubuntu 14.04 64bit).

Switched back to 2016.1 and everything just works fine (well, besides IPython 5.0 which does not work in 2016.1 and does work in 2016.2..)

 

Any ideas?

Thanks

1
正式评论

Please try to turn off "Show return values" option (you can find it in the settings of the Debug tool bar, the gear icon). Does it help?

Hi Adi Perry! Could you please provide a code sample for reproducing the issue?

0
Avatar
Permanently deleted user

FWIW, I experience this issue when remote debugging Autodesk MotionBuilder 2016.  Disabling "Show return values" clears things up and returns the debugger to the speed I'm familiar with.

Is there a way to disable that setting permanent across sessions & projects?

0

I've found that the slowness stems from getting the string representation of large data structures. With numpy for instance, you usually don't get any issues with normal arrays, but if you create some monster data structure w/ nested arrays, it can start to blow up quickly.

For instance:
import numpy as np
dt = np.dtype([('foo',np.uint32),('bar',np.ndarray)])
x = np.empty((5000),dtype=dt)
x['bar'] = [np.random.uniform(0,1000,1000) for i in xrange(x.size)]
[BREAKPOINT]
In the debugger, everything will be extremely slow... BUT if at the top of your code you add the following, things are much quicker:
np.set_printoptions(threshold=5)

This doesn't help for normal python lists/classes, but helps alot for numpy stuff.

Related:
https://intellij-support.jetbrains.com/hc/en-us/community/posts/205819689-How-to-deal-with-collecting-data-in-debugger-

1
Avatar
Permanently deleted user

Hi,

FWIW, I'm debugging in CLion while loading in very large data structures.  I have found that if I step through the code, performance is terrible and I get time-outs and early exits from my debugging sessions. HOWEVER, I find that if I instead set breakpoints instead, performance is way, way better. Perhaps this is related to Elizabeth's comment that debugging performance can be improved by turning off the "show return values" option. I couldn't find that option, but if it's the cause of the slowness, my recommendation would be to have the "show return values" feature off by default. 

Anyway, I was really surprised by how much faster the debugging is with large data using break points rather than stepping.

Dave

0

请先登录再写评论。