Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

caching candidate file-names is doable? #244

Closed
godhelpjun opened this issue Sep 14, 2016 · 4 comments
Closed

caching candidate file-names is doable? #244

godhelpjun opened this issue Sep 14, 2016 · 4 comments
Labels

Comments

@godhelpjun
Copy link

godhelpjun commented Sep 14, 2016

As I said before,command-t is a great plug-in,I love it,use it every work day.
This is my situation:I open a group of files : a.php,b.php... get some things done. close vim to keep my work desk clean. then I open another group of files : c.php,d.php with another vim session. on my project's directory.it's about 15k files in that hierarchies. every session initials candidate file names costs me 5-10 seconds.my project is stable.rarely added or removed too much files.
So,I was wondering,can we just create a files list,i.e : find >fileslist.txt ,and then we set some switches like : let g:CommandTCandidateFile='filelist.txt' ,then we just search names in the file fileslist.txt to get the matching result?
Or,add some switches some thing like let g:CommandTShareCaching='true' to share caches between the vim sessions ?
Finally,I'm not sure if I can get the 'watchman' works properly in my cygwin...
Best regards.Love you.

@wincent
Copy link
Owner

wincent commented Sep 14, 2016

If it's costing 5-10 seconds, you should consider using the Watchman scanner, although like you said, whether it works on cygwin is not really known. There is some Windows support.

Watchman should bring that time down to less than a second (potentially close to zero seconds). I think making that work would be preferable to adding a caching feature. (Another thing about caching: when caches get stale they can be annoying; see #238 for how we might avoid staleness when using Watchman.)

@godhelpjun
Copy link
Author

Thanks to your information.Maybe I could try watchman in cygwin,but I can't see the chances.In general,I don't think watchman is friendly to all windows users.so watchman on windows seems not a good idea.
Love you.

@wincent
Copy link
Owner

wincent commented Sep 14, 2016

I think getting Watchman working is a strictly superior solution because it allows you to have speed and avoid any problems with cache staleness. Adding caching would introduce internal complexity, and while it would help the slowness problem, it would bring with it a new set of problems (staleness).

So it's not something that I personally would be motivated to work on, but I've added the "wishlist" label to this issue. If somebody wants to take a stab at implementing this in a PR in a clean way that makes the cost of the additional internal complexity manageable, then I'd be happy to review it.

@wincent
Copy link
Owner

wincent commented Aug 26, 2022

Given the big rewrite for v6.0.x, I'm closing all older issues as there is unlikely to be anything significant happening on the 5-x-devel branch from here on1. Feedback issue for 6.0.x is here:

Footnotes

  1. Patches and PRs would be welcome, but my personal efforts are going to be directed towards main.

@wincent wincent closed this as not planned Won't fix, can't repro, duplicate, stale Aug 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants