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: 1.7] BUG - GREP slows to a crawl with large number of matches on a single file


Jim Reisert wrote:

>On Fri, Nov 6, 2009 at 7:12 AM, Cooper, Karl (US SSA)
><karl.cooper@baesystems.com> wrote:
>
>> Corinna Vinschen wrote:
>>> Or try LANG=C.ASCII since LANG=C will still return UTF-8 as charset
>>> when calling nl_langinfo(CHARSET).
>>
>> Yes, this solves it:
>>
>> $ time LC_ALL=C.ASCII grep dog testfile | wc
>>  100000  900000 4500000
>>
>> real    0m0.359s
>> user    0m0.279s
>> sys     0m0.232s
>
>
> I just tried this on my system, I routinely grep groups of files
> containing 100K lines.  I was *astounded* how fast "grep" is after
> setting LC_ALL=C.ASCII !


The second run of grep is usually much faster due to disk buffering.




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


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