vim-obsession icon indicating copy to clipboard operation
vim-obsession copied to clipboard

commit d2818a61 leads vim response very slowly on Windows

Open roachsinai opened this issue 3 years ago • 5 comments

GVim sometimes response after more than one seconds, and the key I pressed can show on rightbottom on Gvim like below:

image

Releated commit is https://github.com/tpope/vim-obsession/commit/d2818a614ec3a5d174c6bb19e87e2eeb207f4900

Revert to d2818a6^, above problem disappear.


Platform: Win11, vim 64-bit.

roachsinai avatar Apr 06 '22 13:04 roachsinai

Can you narrow down the cause? If you comment out the rename, does the problem go away?

tpope avatar Apr 06 '22 19:04 tpope

Yes, comment out the rename at line 85, the problem go away.

roachsinai avatar Apr 07 '22 01:04 roachsinai

Maybe it's getting hung up overwriting the existing file? Maybe try adding a delete(g:this_obsession) before it? (Although that kind of defeats the purpose of the change.)

tpope avatar Apr 07 '22 01:04 tpope

Just wanna make sure that when overwrite the existing file, does it was opened? In windows you can't move/delete an opened file.

roachsinai avatar Apr 07 '22 01:04 roachsinai

The file in g:this_obsession shouldn't be open at that point, no.

tpope avatar Apr 07 '22 01:04 tpope