Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork772
Description
I have noticed that periodically when saving python files, vim would hang for a while. I used vim's profiling to show that the culprit was a function called RopeAfterSaveAction, which appears to be runninghttps://github.com/klen/python-mode/blob/a5d0e0061094bd79cf330e680faf593b70a0757e/pylibs/ropemode/interface.py#L68 (after_save_actions) under the hood.
here is the relevant profiling information, in this case run in a directory with an existing .ropeproject with only one buffer open:
FUNCTION RopeAfterSaveActions()Called 1 timeTotal time: 0.287060 Self time: 0.287060count total (s) self (s) 1 0.287058 python ropevim.after_save_actions()
That was long enough to be noticeable, but with only one buffer open. With multiple ones I have profiled it at over 1.5 seconds. It isn't consistently slow though, even with multiple python buffers open. Most of the it is several orders of magnitude faster, which seems like what is intended. I am not sure how to intentionally reproduce the slowness, unfortunately.
If it isn't possible to make the function significantly faster (an order of magnitude), could it be made to run asynchronously?
possibly related to#254 and#209
for reference, my vim configuration (including pymode settings) ishttps://github.com/coaxmetal/dotfiles/blob/master/.vimrc