Re: vimgrep slow?

2006-04-28 Thread Charles E Campbell Jr
Yakov Lerner wrote: From two experiments below, it follows that vimgrep time is dominated (75-99%) by some overhead of file opening, while while searching is small fraction of [current] vimgrep time (1-15%) Here are two experiments by which I tried to tell apart two parts of vimgrep, (1) the p

Re: vimgrep slow?

2006-04-28 Thread Yakov Lerner
On 4/28/06, Bram Moolenaar <[EMAIL PROTECTED]> wrote: Yakov Lerner wrote: > > How much extra time does it take to read the marks from the .viminfo > > file? > > There are 1358 files in $VIMRUNTIME (vim7f). > Executint this with no :au commands (vim -u NONE) > TIM vimgrep klslkjljklkj $VIMRUNT

Re: vimgrep slow?

2006-04-28 Thread Bram Moolenaar
Yakov Lerner wrote: > > > > On 4/27/06, Bram Moolenaar <[EMAIL PROTECTED]> wrote: > > > > > Before even thinking of disabling autocommands, we first need proof > > > > > that > > > > > this actually changes the search time more than a few percent. > > > > > > > > > > Above that, if BufRead autoc

Re: vimgrep slow?

2006-04-28 Thread Yakov Lerner
On 4/28/06, Bram Moolenaar <[EMAIL PROTECTED]> wrote: Yakov Lerner wrote: > > On 4/27/06, Bram Moolenaar <[EMAIL PROTECTED]> wrote: > > > Before even thinking of disabling autocommands, we first need proof that > > > this actually changes the search time more than a few percent. > > > > > > Abo

Re: vimgrep slow?

2006-04-28 Thread Bram Moolenaar
Yakov Lerner wrote: > > On 4/27/06, Bram Moolenaar <[EMAIL PROTECTED]> wrote: > > > Before even thinking of disabling autocommands, we first need proof that > > > this actually changes the search time more than a few percent. > > > > > > Above that, if BufRead autocommands take so much time there

Re: vimgrep slow?

2006-04-28 Thread Yakov Lerner
On 4/27/06, Bram Moolenaar <[EMAIL PROTECTED]> wrote: > Before even thinking of disabling autocommands, we first need proof that > this actually changes the search time more than a few percent. > > Above that, if BufRead autocommands take so much time there is probably > something wrong with them.

Re: vimgrep slow?

2006-04-27 Thread Eric Arnold
On 4/27/06, Bram Moolenaar <[EMAIL PROTECTED]> wrote: > > Eric Arnold wrote: > > > That will probably do for now. Thanks. > > > > However, having a flag would be a good thing, since it would allow > > future modifications to vimgrep to be encapsulated in the flag. > > Meaning, in the future, :vi

Re: vimgrep slow?

2006-04-27 Thread Bram Moolenaar
Eric Arnold wrote: > That will probably do for now. Thanks. > > However, having a flag would be a good thing, since it would allow > future modifications to vimgrep to be encapsulated in the flag. > Meaning, in the future, :vimgrep /pattern/fast would not > necessarily be synonymous with

Re: vimgrep slow?

2006-04-27 Thread Eric Arnold
That will probably do for now. Thanks. However, having a flag would be a good thing, since it would allow future modifications to vimgrep to be encapsulated in the flag. Meaning, in the future, :vimgrep /pattern/fast would not necessarily be synonymous with :set eventignore=all On 4/27/

Re: vimgrep slow?

2006-04-27 Thread Benji Fisher
On Thu, Apr 27, 2006 at 07:44:24AM -0600, Eric Arnold wrote: > I would be nice to have a flag for vimgrep to skip all the filetype > slow stuff when you want to do a large grep, and you know you don't > care about .gz files, etc., which I almost never do. In an earlier post on this thread, Br

Re: vimgrep slow?

2006-04-27 Thread Eric Arnold
I would be nice to have a flag for vimgrep to skip all the filetype slow stuff when you want to do a large grep, and you know you don't care about .gz files, etc., which I almost never do. On 4/27/06, Benji Fisher <[EMAIL PROTECTED]> wrote: > On Wed, Apr 26, 2006 at 05:24:00PM -0700, Hari Krishn

Re: vimgrep slow?

2006-04-27 Thread Benji Fisher
On Wed, Apr 26, 2006 at 05:24:00PM -0700, Hari Krishna Dara wrote: > > On Wed, 26 Apr 2006 at 10:01pm, Yakov Lerner wrote: > > > 1. I did > > > > :20verb vimgrep lakslaskjda $VIMRUNTIME/** > > > > and found, to my surprise, that vim sources .viminfo and > > executes 'au BufRead' for *every*

Re: vimgrep slow?

2006-04-26 Thread Hari Krishna Dara
On Wed, 26 Apr 2006 at 10:01pm, Yakov Lerner wrote: > On 4/26/06, Eric Arnold <[EMAIL PROTECTED]> wrote: > > I'm using win32 gvim70f. If I use the externan Cygwin grep > > > > grep -i -r vimgrep . > > > > it returns the results in under a second. > > > > :vimgrep vimgrep ** > > > > takes about 2

Re: vimgrep slow?

2006-04-26 Thread Mikolaj Machowski
Dnia niedziela, 23 kwietnia 2006 18:03, Eric Arnold napisaƂ: > Am I doing something wrong, or is :vimgrep about 10x slower than a > shell grep? It is faster when looking in current file and slower when scanning multiple files. Reason for that is probably fact Vim is traditionally slow with I/O o

Re: vimgrep slow?

2006-04-26 Thread Bram Moolenaar
Yakov Lerner wrote: > On 4/26/06, Eric Arnold <[EMAIL PROTECTED]> wrote: > > I'm using win32 gvim70f. If I use the externan Cygwin grep > > > > grep -i -r vimgrep . > > > > it returns the results in under a second. > > > > :vimgrep vimgrep ** > > > > takes about 20 seconds. > > 1. I did > >

Re: vimgrep slow?

2006-04-26 Thread Charles E Campbell Jr
Eric Arnold wrote: I'm using win32 gvim70f. If I use the externan Cygwin grep grep -i -r vimgrep . it returns the results in under a second. :vimgrep vimgrep ** takes about 20 seconds. Without having looked at the code, let me assume that vimgrep is simply re-using its regular expressio

Re: vimgrep slow?

2006-04-26 Thread Yakov Lerner
On 4/26/06, Eric Arnold <[EMAIL PROTECTED]> wrote: > I'm using win32 gvim70f. If I use the externan Cygwin grep > > grep -i -r vimgrep . > > it returns the results in under a second. > > :vimgrep vimgrep ** > > takes about 20 seconds. 1. I did :20verb vimgrep lakslaskjda $VIMRUNTIME/** and

Re: vimgrep slow?

2006-04-26 Thread Eric Arnold
I'm using win32 gvim70f. If I use the externan Cygwin grep grep -i -r vimgrep . it returns the results in under a second. :vimgrep vimgrep ** takes about 20 seconds. On 4/26/06, Benji Fisher <[EMAIL PROTECTED]> wrote: > On Sun, Apr 23, 2006 at 10:03:26AM -0600, Eric Arnold wrote: > > Am I doi

Re: vimgrep slow?

2006-04-26 Thread Benji Fisher
On Sun, Apr 23, 2006 at 10:03:26AM -0600, Eric Arnold wrote: > Am I doing something wrong, or is :vimgrep about 10x slower than a > shell grep? I have not tested, but I assume that there is less overhead in calling :vimgrep (internal) than the external grep. I would not be surprised if the

vimgrep slow?

2006-04-23 Thread Eric Arnold
Am I doing something wrong, or is :vimgrep about 10x slower than a shell grep?