Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spyder stops executing commands if Variable explorer shows complicated objects #4221

Closed
talkaminker opened this issue Mar 2, 2017 · 1 comment

Comments

@talkaminker
Copy link
Contributor

talkaminker commented Mar 2, 2017

Description

I often found that spyder sometimes becomes unusable because some complicated object is present in the variable explorer
even running 1+1 just hangs and takes ages to be executed
Here is a working example

run the following code:

from collections import defaultdict
import numpy as np
bug = defaultdict(list)
for i in range(50000):
    a = {j:np.random.rand(10) for j in range(10)}
    bug[i] = a

Now running even the simplest stuff in the ipython console is unbearably slow.
changing bug to be of type dict solves it

Please provide any additional information below
I dont have autorefresh enabled (I didn't change any options in th Varibale explorer)

My guess is that the code that creates the string representation for variable explorer doesn't have an optimization for very large defaultdict.
This makes defaultdict unusable for me.

Version and main components

  • Spyder Version: 3.1.3
  • Python Version: 2.7.12
  • Qt Versions: 5.6.2, PyQt5 5.6 on Linux

Dependencies

pyflakes >=0.5.0 :  1.3.0 (OK)
pep8 >=0.6       :  1.7.0 (OK)
pygments >=2.0   :  2.1.3 (OK)
qtconsole >=4.2.0:  4.2.1 (OK)
nbconvert >=4.0  :  4.2.0 (OK)
pandas >=0.13.1  :  0.19.2 (OK)
numpy >=1.7      :  1.11.2 (OK)
sphinx >=0.6.6   :  1.4.6 (OK)
rope >=0.9.4     :  0.9.4 (OK)
jedi =0.9.0      :  0.9.0 (OK)
psutil >=0.3     :  4.3.1 (OK)
matplotlib >=1.0 :  1.5.3 (OK)
sympy >=0.7.3    :  1.0 (OK)
pylint >=0.25    :  1.5.4 (OK)

@ccordoba12 ccordoba12 added this to the v3.2 milestone Mar 2, 2017
@ccordoba12 ccordoba12 changed the title spyder stops executing commands if Vriable explorer shows complicated defaultdict object Spyder stops executing commands if Variable explorer shows complicated defaultdict object Mar 2, 2017
@ccordoba12
Copy link
Member

Thanks for the report and for the reproducible example. We'll take a look at this problem for Spyder 3.2

@ccordoba12 ccordoba12 modified the milestones: v3.2, v3.2.1 Jun 13, 2017
@ccordoba12 ccordoba12 modified the milestones: v3.2.1, v3.2.2 Jul 28, 2017
@ccordoba12 ccordoba12 changed the title Spyder stops executing commands if Variable explorer shows complicated defaultdict object Spyder stops executing commands if Variable explorer shows complicated objects Aug 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants