python-mode completion becomes unusably slow on OSX Yosemite

Created on 28 Feb 2015  路  7Comments  路  Source: python-mode/python-mode

At first I thought perhaps it was iTerm2 (where performance is so bad you can literally wait seconds for the completions to occur) so I groaned and switched back to OSX Terminal.

It's still pretty bad there - I'd sincerely appreciate the opportunity to help debug this problem. I don't know VimL (yet :) but I bought the book. I know Python, and I love this tool :)

For instance, upon typing this line:

self.assertNotIn('Use the Raspberry Pi to build a robot', page_text)

it took vim/python-mode close to 40 seconds to actually 'render' the text and allow me to continue.

On the off chance someone else has seen this and knows of a fix though, I'd appreciate haring about that as well.

(FWIW I tried with stock OSX Python, homebrew Python 3 (shown here) stock OSX Vim, and homebrew built vim HEAD with python3 support (shown here))

Pymode diagnostic

VIM:704, OS: Darwin, multi_byte:1, pymode: 0.8.1, pymode-python: python3

+python: 0
+python3: 1

VIM python paths:

/Users/cpatti/.vim/bundle/python-mode/pymode/libs/pylama/lint/pylama_pyflakes
/Users/cpatti/.vim/bundle/python-mode/pymode/libs3
/Users/cpatti/.vim/bundle/python-mode/pymode/libs
/Users/cpatti/.vim/bundle/python-mode
/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/setupto
/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pip-6.0
/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python34.zip
/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4
/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/plat-darwin
/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/lib-dynload
/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages
_vim_path_

Pymode variables:

let pymode = 1
let pymode_breakpoint = 1
let pymode_breakpoint_bind = 'b'
let pymode_doc = 1
let pymode_doc_bind = 'K'
let pymode_folding = 1
let pymode_indent = 1
let pymode_lint = 1
let pymode_lint_checkers = ['pyflakes', 'pep8', 'mccabe']
let pymode_lint_cwindow = 1
let pymode_lint_ignore = ''
let pymode_lint_message = 1
let pymode_lint_on_fly = 0
let pymode_lint_on_write = 1
let pymode_lint_select = ''
let pymode_lint_signs = 1
let pymode_motion = 1
let pymode_options = 1
let pymode_paths = []
let pymode_quickfix_maxheight = 6
let pymode_quickfix_minheight = 3
let pymode_rope = 1
let pymode_run = 1
let pymode_run_bind = 'r'
let pymode_trim_whitespaces = 1
let pymode_virtualenv = 1
let pymode_virtualenv_enabled = ''
let pymode_virtualenv_path = ''

Most helpful comment

This has nothing to do with the terminal emulator you're using (I too use iTerm2 on Mac OS X). The delay is due to the Rope refactoring plugin: http://rope.sourceforge.net/. I disable it with

let g:pymode_rope=0

in my $HOME/.vim/vimrc. My feeling is that if you want that level of handholding you're better off using a real Python IDE such as Wingware or PyCHARM. I would probably disable it even if it wasn't so painfully slow as I'm old school (I started programming when punched cards were still in widespread use :-)

All 7 comments

This has nothing to do with the terminal emulator you're using (I too use iTerm2 on Mac OS X). The delay is due to the Rope refactoring plugin: http://rope.sourceforge.net/. I disable it with

let g:pymode_rope=0

in my $HOME/.vim/vimrc. My feeling is that if you want that level of handholding you're better off using a real Python IDE such as Wingware or PyCHARM. I would probably disable it even if it wasn't so painfully slow as I'm old school (I started programming when punched cards were still in widespread use :-)

@krader1961 I don't care much about refactoring, but the nice code completions that plugins offered were an awfully big productivity boost from where I sit.

Thanks, at least disabling it got me working. I'll go report a bug over there and see where I get :)

Issue report over there in case anybody else suffering the same problem googles and cares to track. @krader1961 whether you use it or not I'd love a +1 to let the rope folks know I'm not just a crackpot who can't get his config together :)

https://github.com/python-rope/ropevim/issues/39

@krader1961 is right, that this issue is coursed by rope. But I think the issue lies with the version of Rope bundled with python-mode. I just installed the python-mode found in this pull request and my completion is now as fast as ever.

@Telling That works great! Thanks! I just changed the klen/python-mode neobundle ref in my .vimrc to:

NeoBundle 'TFenby/python-mode', { 'branch' : 'develop' }

and it works famously! Thank you! Hopefully at some point the author will merge your PR :)

Slow while saving files on OSX Yosemite using macvim, don't know why, just get below message:

[Pymode] Found errors and warning: 0

image

Try the last development version.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pieterdd picture pieterdd  路  4Comments

kryptek picture kryptek  路  10Comments

jabbalaci picture jabbalaci  路  8Comments

weatherfrog picture weatherfrog  路  6Comments

Ins1ne picture Ins1ne  路  10Comments