This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Best AVS to use with cygwin


On 10/15/07, Olivier Langlois <Olivier.Langlois@streamtheworld.com> wrote:
> Hi,
>
> I am currently using Kaspersky AVS but I am looking for a replacement because using it with Cygwin brings my system unstable whenever a bunch of child processes are spawn (ie: find . -name '*.h' -exec grep -l pattern {} \;'. Someone has even put the blame on Cygwin on their forum:
[...]
> Olivier Langlois


While not exactly an answer to your question, generally using "find"
with -exec is horribly inefficient.  In many cases, you can get the
same result by using:
    find -name '*.h' | xargs grep -l pattern
Your version spawns a new grep process for every single file, while
using xargs only spawns a new process when the max argument length has
been reached.  If the problem comes from kaspersky because of the
process creation overhead, that would help you out a LOT.  You'll
probably also notice that your greps go much faster.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]