Gary Johnson wrote:

> On 2012-10-18, [email protected] wrote:
> > Comment #1 on issue 85 by [email protected]: :grep in gvim on Linux
> > is much slower than the same :grep in vim in the various terminal
> > emulators
> > http://code.google.com/p/vim/issues/detail?id=85
> > 
> > On the mailing list (not here on the bug report) Gary Johnson replied
> > and said:
> > 
> > 垂
> > I'm not seeing that running Vim 7.3.646 on Fedora 11 under KDE
> > 4.3.1.  Both are pretty fast and gvim is even faster than vim.
> > 
> > Running the following in an xterm,
> > 
> >     time vim -Nu NONE -c 'silent grep -r house tmp/gvim-grep-test' -cq
> > 
> > I got results typically like these:
> > 
> >     real    0m5.128s
> >     user    0m0.487s
> >     sys     0m0.495s
> > 
> > Times running in a GNOME Terminal were essentially the same.
> > 
> > Running the following,
> > 
> >     time gvim -f -Nu NONE -c 'silent grep -r house tmp/gvim-grep-test' -cq
> > 
> > I got results typically like these:
> > 
> >     real    0m3.459s
> >     user    0m0.610s
> >     sys     0m0.497s
> > 
> > Note that the gvim times are even better than the xterm/vim times,
> > presumably because of the time xterm needed to write all those lines
> > to the display.  That's even including the time it takes to just
> > start gvim, which about a second.
> > 
> > Regards,
> > Gary
> > 遙
> > 
> > well, I've tried your command-lines and they are indeed comparably
> > fast. However (and it's a big "however"), you have done ":silent
> > grep" instead of non-silent ":grep". The same command lines with the
> > :silent modifier removed, and a carriage return pressed quickly,
> > again yield the problematic behaviour on gvim alone.
> > 
> > Can you try it without a ":silent" and report back?
> 
> I was just using :silent to avoid the "Press ENTER" prompt, not mask
> the problem.  Without :silent I see what you mean.  What a
> difference!  Gvim takes over a minute!  Typical gvim result:
> 
>     real    1m3.562s
>     user    0m3.954s
>     sys     0m0.900s
> 
> Typical vim result:
> 
>     real    0m6.373s
>     user    0m0.496s
>     sys     0m0.514s

The GUI uses a dumb (very dumb) terminal emulater.  If there is text
echo'ed on the screen that could very well be the problem.

Making that terminal emulater better has been on the todo list since the
first GUI version...

-- 
Hanson's Treatment of Time:
        There are never enough hours in a day, but always too
        many days before Saturday.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

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