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

opening file_rec and file_rec/async slow when opening for the second time #705

Closed
prabirshrestha opened this issue Aug 24, 2014 · 6 comments

Comments

@prabirshrestha
Copy link

We have lot of files in the source control and using both file_rec and file_rec/async seems to be slow.

Ctrlp seems to be really fast after the caching compared to unit.vim. Ctrlp takes few milliseonds to open after cache while unit.vim takes few seconds. Wondering if it retains the cache in memory after it closes. (I haven't looked at the internal details for both ctrlp and unite.vim). Might be unit.vim should have persist cache in memory option? You can try reproducing this by comparing unit.vim vs ctrlp in the windows directory or any large folders.

using ag under windows when executing :Unite file_rec/async

 let g:unite_source_rec_async_command = 'ag --follow --nocolor --nogroup --hidden -g ""'
@Shougo
Copy link
Owner

Shougo commented Aug 25, 2014

Unite.vim already implements cache feature.
But current Vim has GC performance problem. So it is slow if the directory is large.

#701

@Shougo Shougo closed this as completed Aug 25, 2014
@Shougo
Copy link
Owner

Shougo commented Aug 25, 2014

In Windows environment, file_rec/async is very slow. You should not use it.
I recommend "file_rec" source for you.

@Shougo
Copy link
Owner

Shougo commented Feb 3, 2015

@prabirshrestha
Copy link
Author

awesome. will try it out when v7.4.615+ gets released at https://bintray.com/veegee/generic/vim_x64

@prabirshrestha
Copy link
Author

using vim 7.4.617.

Opening unite.vim for the first time seems faster and more responsive then CtrlP but when I open the second time it is slow and not so responsive.

While unite.vim does use cache does it read from the cache file everytime or only for the first time?

@prabirshrestha
Copy link
Author

seems like i was missing -resume option. This makes it very fast even with sync file_rec the second time. :Unite file_rec -input= -resume

call unite#filters#matcher_default#use(['matcher_fuzzy'])
call unite#filters#sorter_default#use(['sorter_rank'])

nnoremap <C-P> :<C-u>Unite -buffer-name=files -start-insert buffer -input= -resume file_rec:!<cr>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants