On Wed, Sep 23, 2009 at 8:43 AM, Joel Bernstein <[email protected]> wrote:
>
> I find that "**" in &path causes my project (~6500 files in ~500
> subdirs, in a local filesystem on a powerful machine with almost no
> load) to take a LONG time when doing anything like :find - i can also
> replicate this with :expand('**/*') or a similar :glob() call. :pwd
> says I'm in project toplevel, :set path shows "path=.,,**".
>
> By contrast, find . -type f -print0 | grep -FZz Some/Path/File.pm
> returns almost instantly. As you'd expect. I'm using vim / gvim v7.2,
> built by Debian for 64 bit Linux.
>
> Is the "**" wildcard deprecated? Is the sort of slowness I see (just
> using :expand to list all files below . takes minutes) usual? I have
> been working on various projects using the same &path definition for
> years without issue.
>
> I'm unsure how to approach debugging this. A strace on the gvim
> process while it's hanging suggests it's poll()ing fd 5 (a socket..)
> like crazy. Any suggestions / tests / ways to rule out possibilities
> are gratefully accepted. If 6500ish files is too much for :find, is
> there a better option / workaround? Is this expected / usual
> behaviour? Is the ** wildcard performant?

Did the "**" perform better earlier? I rarely use "**" so I can't tell
for sure if it has become slower in the newer vim versions, but my
experience has always been for it to take several minutes at the root
of my project with several thousand files in several hundred
directories (like how the java packages are usually arranged). This is
the main reason I resorted to a tags file based approach for my
lookupfile plugin. If you don't find a solution for this problem, you
could consider lookupfile (and others such as fuzzyfinder) as a
workaround. Lookupfile depends on a dump of the find command organized
in the format of a valid tags file and uses that information to match
partially typed text or regex and present all the file matches. It
uses the insert-mode completion to make it seamless. Check it out at:

http://www.vim.org//script.php?script_id=1581

-- 
HTH,
Hari

>
> Thanks,
>
> /joel
> --
> Joel Bernstein
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to