:cgetfile versus :grep performance

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

:cgetfile versus :grep performance

Lech Lorens

While testing the performance of Vim after applying my patch for
location lists and quickfix windows I discovered that :grep performs
much better than :cgetfile. Sometimes I performed ":grep e" in the
source directory of Vim, sometimes I called ":cgetfile e_list.txt"
(e_list.txt contained a previously prepared output of "grep e ..."). The
result was that it was always about 4 times faster to use :grep.

Does anyone know any quick and easy explanation for this behaviour? Is
this issue worth investigating?

PS The same obviously relates to :lgetfile vs :lgrep.

--
Cheers,
Lech

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: :cgetfile versus :grep performance

Lech Lorens

In case anyone should ever be bothered by this issue again, I'll
answer myself. Both commands will take almost the same amount of time
to complete (actually, :cgetfile seems a little faster) if they use
the same error format list. In my case 'grepformat' consisted of 3
patterns and 'errorformat' from as many as 15. Hence the difference.

--
Cheers,
Lech
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---