ivanov / vim-ipython

A two-way integration between Vim and IPython 0.11+
http://github.com/ivanov/vim-ipython
1.04k stars 163 forks source link

gvim very CPU-hungry after a while #80

Open davidbrochart opened 10 years ago

davidbrochart commented 10 years ago

After several hours of use gvim gets very slow each time the window gets focus. It easily gets stuck for a second or two.

dusans commented 10 years ago

what is your updatetime?

davidbrochart commented 10 years ago

I just updated. It seems to be better but still at the beginning it is very quick and then switching to the shell takes a second. Also, mouse-over a variable doesn't show the IPython "?" equivalent like it used to do.

dusans commented 10 years ago

I meant the setting in vim :)

set updatetime

davidbrochart commented 10 years ago

updatetime=4000

ivanov commented 10 years ago

@davidbrochart can you tell me a bit more about your usage pattern? Are you out of the gvim window for a while doing stuff with that same IPython kernel from another client, by chance? Vim-IPython will process all messages when it hasn't been in focus for a while, so maybe that's what's happening. It'd be good to get a handle on this behavior to be able to reproduce it consistently, so any pointers in that direction would be helpful

davidbrochart commented 10 years ago

Here is a sample code that you can use to reproduce the problem:

while True: pass pass pass ...

Say you have 100 "pass" instructions. Select the whole code with Shift-V and send it to IPython with Ctrl-s. Send a keyboard interruption in the shell window with Ctrl-c. Repeat the same process tens of time and you should see gvim getting slower and slower, especially when gvim's window gets focus.