2009/9/23 Hari Krishna Dara <[email protected]>: > > 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?
Yes, I've been using this on other builds of vim (including 7.2, I thought..) for a couple of years. Zsh globbing with ** is fast, as is find(1). I'll investigate whether it only happens with gvim (I didn't mention in my original post that I'm using gvim, sorry) or exists in console too. I am wondering if the X socket traffic is interrupting the path globbing. > 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). That's not been my experience, indeed I tend to use :sfi Some/Path/Fragment.pm and it's usually instant. I'm not sure whether this is an Debian/Ubuntu vim issue or a Vim bug. Or just a poorly implemented recursive wildcard expansion - making zsh's ** work well certainly took some work, I'm told. Any further input? Did ** become slower in recent vims? Thanks, /joel --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
