Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

function RopeAfterSaveActions() sometimes hangs vim on write (very slow) #257

Closed
@derekleverenz

Description

@derekleverenz

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp