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. > > $ 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
