ctrlp.vim icon indicating copy to clipboard operation
ctrlp.vim copied to clipboard

typing in index several seconds for 1 letter

Open dezza opened this issue 13 years ago • 5 comments

I have tried to use a vimrc without anything but nocompatible and runtime ! plugin/ctrlp.vim

If I type anything to search through the filelist (the one that comes up pressing CTRL+P by default) it slowly types and searches with several seconds for 1 letter appearing ...

I know there already is a closed issue, but I thought you should know, since I've narrowed it down to really being a problem with the plugin itself or gVim for Windows - I didn't include mswin.vim optimizations or behave mswin, but I tried earlier with it, and also tried various other combinations.

Can only get this to run fast on Linux at the moment.

dezza avatar Dec 17 '12 15:12 dezza

Which closed issue do you refer to? But this slowness is typically because ctrlp can't handle the large file list. This is slightly more apparent on Windows. There's really nothing I can do about it other than to tell you to try limiting the number of files with the g:ctrlp_max_files option, and updating ctrlp and gVim.

kien avatar Dec 17 '12 16:12 kien

Seems similar to these issues: https://github.com/kien/ctrlp.vim/issues/331 https://github.com/kien/ctrlp.vim/issues/46 https://github.com/kien/ctrlp.vim/issues/55 https://github.com/kien/ctrlp.vim/issues/116

dezza avatar Dec 17 '12 22:12 dezza

Have you read them or just put up everything you could find after I asked?

#46 wasn't a bug. It was a delay when starting up caused by the user having similar mappings. #55 I even asked the person in another issue but he never provided the file that caused it. #116 was fixed. It was fnamemodify() being slow, the same reason I've always tried to avoid using this function. #331 is this issue.

Also, I want to add that I see every issue as something that I need to deal with, to be done. I will close and ignore the ones that I deem not worth following up, they may or may not be actual fixable bugs. But if there's a valid bug or a common problem I can identify, I always try to fix it or at least provide a solution for it as soon as I see the report.

kien avatar Dec 18 '12 00:12 kien

I think I'm suffering from the sheer number of files as well. I'm working in a huge repository and depending on my search, it sometimes takes seconds to even display the letters I'm typing, let alone the results I'm looking for. This is only for certain searches though.

I also have a problem with a couple files not being found at all, but if I search from a lower-level directory (where I know these two files that won't show up would be the only ones CtrlP could find) then it finds them. If I search from the higher-level directory it finds a file with the same name in a different subdirectory but not the files in the other.

I will try setting the g:ctrlp_max_files variable and see if that helps. Is there a comprehensive list of CtrlP settings? It seems like I've discovered several settings by encountering issues and then Googling for them, finding the same issue in the issue tracker, and then seeing new variables I can use that I've never seen in the documentation. If you wouldn't mind adding a comprehensive list of these variables in the README I think it would be tremendously useful :)

AlexAllocated avatar Mar 04 '14 18:03 AlexAllocated

CtrlP has a documentation which you can access by running :help ctrlp.txt. All the available options are documented in there.

kien avatar Mar 05 '14 10:03 kien