On Wednesday, June 20, 2012 1:07:54 PM UTC+8, Clark WANG wrote:
> On Wednesday, June 20, 2012 10:54:04 AM UTC+8, Nazri wrote:
> > On Tue, Jun 19, 2012 at 3:42 PM, Clark WANG wrote:
> > > My vim settings: wildignore=*.o,*.so wildmode=longest,list,full
> > >
> > > On my system (Solaris 11, x86) I have a dir (named foo) under which 
> > > there're about 200 files (the foo dir itself is part of a big project 
> > > which has many dirs and files). Everytime I type `:e foo/<TAB>' it takes 
> > > vim 10~15 seconds to display all the files and vim uses high CPU 
> > > resource. If I `set wildignore=' then it works fine and all the files are 
> > > displayed instantly.
> > >
> > > With truss (like strace on Linux) I found out that with 
> > > wildignore=*.o,*.so, vim will call 
> > > open64()+fchdir()+chdir()+getcwd()+fchdir()+close() for every file it 
> > > finds. See line 357~862 of the attached file.
> > >
> > > Is that a problem?
> > 
> > On my system (linux, vim 7.3 patches 1-556) I don't see such slowness
> > (albeit with hundreds of repeated getcwd as reported by strace):
> 
> You're right. I can reproduce this problem only in our project source tree. 
> Seems like files/dirs outside of the foo/ dir also matter. But I failed to 
> find a simple way to reproduce that and setting wildignore to empty really 
> fixed it. I cannot understand why.

I mean I only saw the slowness with our project source tree. In other dirs it's 
not slow though there're a lot of chdir() calls.

> 
> > 
> >   $ mkdir foo
> >   $ cd foo
> >   $ for i in `seq 1 300`;do touch a$i.c a$i.o a$i.so;done
> >   $ cd ..
> >   $ vi
> >   :set wildignore=*.o,*.so wildmode=longest,list,full
> >   :e foo/a<tab>
> >   <file listing, a*.c, appear almost instantaneously>
> > 
> > Is your file system on NFS by any chance?
> 
> No it's not on NFS. It's ZFS.
> 
> > 
> > nazri

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui