slow code completion in editor (all of the sudden)

1,384 views
Skip to first unread message

matt

unread,
Nov 26, 2012, 10:32:19 AM11/26/12
to spyd...@googlegroups.com
I have been using Spyder regularly for over a year on Windows with 64 bit python 2.7(on several different machines).  Recently after some changes to one of my systems(installing some c++ compilers and modifying my path variable) I am getting really slow code completion in the editor frame of Spyder.  Every time I type a period, it takes like 5 seconds to process, kind of like it usually does for the first code completion of the session.  As I changed a lot of things about my system, I can't seem to narrow down what actually is impacting this portion of Spyder code.  Before I have to dive into the Spyder code, can anyone suggest what might be causing this sort of problem?

Thanks,
Matt

Carlos Córdoba

unread,
Dec 5, 2012, 11:35:48 PM12/5/12
to spyd...@googlegroups.com
Hi Matt,

Try to start Spyder from a terminal with the --debug option. Then look
at your .spyder2 folder (in your Users directory) for a file called
rope.log to see if you can find what is causing the problem you mention.

Cheers,
Carlos

El 26/11/12 10:32, matt escribió:
> --
> You received this message because you are subscribed to the Google
> Groups "spyder" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/spyderlib/-/CiL3u4TGZ6wJ.
> To post to this group, send email to spyd...@googlegroups.com.
> To unsubscribe from this group, send email to
> spyderlib+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/spyderlib?hl=en.

Carlos Córdoba

unread,
Jan 9, 2013, 10:32:02 AM1/9/13
to spyd...@googlegroups.com
Hi Nelson,

What library are you using when this happens? Some libraries (e.g. networkx) are very slow to show completions.

If this is not the case for you, could you post a code snippet that clearly shows the problem?

Cheers,
Carlos

El 08/01/13 19:26, Nelson Brown escribió:
I also have this problem.  I can't remember when it started, but I've been avoiding Spyder because of it.

I did not find a rope.log file after running Spyder with --debug.

Previously I got Spyder2 with Python(x,y), but recently my laptop was re-imaged (Windows 7) and this time I'm trying WinPython. (So I'm looking in C:\WinPython-64bit-2.7.3.2\settings\.spyder2 for the rope.log.)

Any other suggestions?  Spyder freezes (not responding) for several seconds whenever I type a dot.  It makes the editor unusable.

Thanks,
Nelson
To view this discussion on the web visit https://groups.google.com/d/msg/spyderlib/-/rT79q4p76bIJ.

Nelson Brown

unread,
Jan 9, 2013, 12:31:27 PM1/9/13
to spyd...@googlegroups.com
Carlos,
After some more poking with it, I'm not as annoyed with this as I was in the past.  It seems that only the first autocompletion is slow, after that the suggestions are much faster (but not instantaneous as in the IPython console.)

I noticed the issue with pylab and tables.  Here is a video of the nuisance issue: https://www.youtube.com/watch?v=pJQ7a03vz5w

I don't have networkx, but core stuff like csv have fast autocompletion.

Maybe this will be helpful to you.

Nelson

Carlos Córdoba

unread,
Jan 10, 2013, 10:27:37 AM1/10/13
to spyd...@googlegroups.com
Thanks for the video Nelson, it shows a well known (and pretty annoying) problem. I'll try to fix it for 2.2.

Cheers,
Carlos

El 09/01/13 12:31, Nelson Brown escribió:
To view this discussion on the web visit https://groups.google.com/d/msg/spyderlib/-/BwqXoXkOPwkJ.

Nelson Brown

unread,
Jan 10, 2013, 10:37:46 AM1/10/13
to spyd...@googlegroups.com
Carlos,
Thanks for looking into it.

I guess my googling skills aren't what I think they are... I was looking for an existing issue that was already reported and known, but I didn't find anything that was still open.

I appreciate your responsiveness and tolerance of noobs like me.

Cheers,
Nelson

Carlos Córdoba

unread,
Jan 10, 2013, 10:48:44 AM1/10/13
to spyd...@googlegroups.com
Don't worry about it, this issue is hard to describe in words but easy to see in a video, that's why I think we don't have an issue for it.

So what I meant is that it's a well known issue to the development team but probably most users are not fully aware of it.

Cheers,
Carlos

El 10/01/13 10:37, Nelson Brown escribió:
To view this discussion on the web visit https://groups.google.com/d/msg/spyderlib/-/L6h1PYNpEhwJ.

Federico Barabas

unread,
Oct 30, 2013, 6:28:29 AM10/30/13
to spyd...@googlegroups.com
Hi everyone!

Is there an update on this?

I have the slow autocompletion issue, even with print command it hangs for ~5s after writing "print(". The second time may be a bit faster but only slightly. I'd say it happens with every module.

I was playing around with this in a big code I'm working on and I noticed that the slow autocompletion only takes place inside if and loops but not in the non-indented code. Maybe this is useful for debugging, I don't know.

My system:
Windows 7
Portable WinPython 64bit 3.3.2.3
Spyder 2.3.0dev6 with rope 0.9.4

Cheers,
Federico

Federico Barabas

unread,
Oct 30, 2013, 3:36:13 PM10/30/13
to spyd...@googlegroups.com
I also use spyder in ArchLinux and there I don't have this issue

Carlos Córdoba

unread,
Oct 31, 2013, 12:46:58 PM10/31/13
to spyd...@googlegroups.com
Hi Federico,

I fixed this problem for 2.2.0 (i.e. about eight months ago), so the problem you are reporting has to be different and (maybe) it only applies to Windows and/or WinPython. I'll take a look at it when I have some time.

Cheers,
Carlos

El 30/10/13 14:36, Federico Barabas escribió:
To unsubscribe from this group and stop receiving emails from it, send an email to spyderlib+...@googlegroups.com.

To post to this group, send email to spyd...@googlegroups.com.

Federico Barabas

unread,
Oct 31, 2013, 2:16:34 PM10/31/13
to spyd...@googlegroups.com
Thank you Carlos

Just today I also noticed that IPython also has speed issues. Showing the output of simple commands like print('hey') can take ~5 seconds. Restarting spyder fixes the problem momentarily.

Maybe at this point I should state that I'm using a not-so-bad computer:
Intel i5
8GB RAM
64-bit Windows 7 SP1

Let me know if I can help you in the debugging. I really want to keep on using spyder, I think it's perfect for scientific use of Python.

thanks again,
Federico


--
You received this message because you are subscribed to a topic in the Google Groups "spyder" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/spyderlib/TzBu8aYFTEk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to spyderlib+...@googlegroups.com.

Federico Barabas

unread,
Nov 1, 2013, 9:15:28 AM11/1/13
to spyd...@googlegroups.com
I've done some more testing.

Autocompletion in the editor is super slow only if the file being edited is long. In new files it's only slow for the first time of writing a command and the following calls are quick.

Regarding the slow IPython autocomplete, I think it only happens after running the commands:

%load_ext autoreload
%autoreload 2

any idea why?

thanks again,
Federico

Federico Barabas

unread,
Nov 7, 2013, 11:23:27 AM11/7/13
to spyd...@googlegroups.com
I had the WinPython installation in a network drive. I moved it to the local drive and now the autocompletion takes a normal amount of time.

Thanks!

Carlos Córdoba

unread,
Nov 13, 2013, 8:11:26 AM11/13/13
to spyd...@googlegroups.com
Hi Federico,

I'm glad you figured it out by yourself. I was about to think this was a major blocker for our next release.

Cheers,
Carlos

El 07/11/13 11:23, Federico Barabas escribió:
Reply all
Reply to author
Forward
0 new messages