delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-0.3 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS |
X-Spam-Check-By: | sourceware.org |
MIME-Version: | 1.0 |
In-Reply-To: | <814i7o$49eric@dmzms99802.na.baesystems.com> |
References: | <20091106135152 DOT GK26344 AT calimero DOT vinschen DOT de> <814i7o$49eric AT dmzms99802 DOT na DOT baesystems DOT com> |
Date: | Fri, 6 Nov 2009 15:22:47 -0700 |
Message-ID: | <806a89db0911061422l290ff84u3d58cbbe1d3eface@mail.gmail.com> |
Subject: | Re: 1.7] BUG - GREP slows to a crawl with large number of matches on a single file |
From: | Jim Reisert AD1C <jjreisert AT alum DOT mit DOT edu> |
To: | cygwin AT cygwin DOT com |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
On Fri, Nov 6, 2009 at 7:12 AM, Cooper, Karl (US SSA) <karl DOT cooper AT baesystems DOT com> wrote: > Corinna Vinschen wrote: >> Or try LANG=3DC.ASCII since LANG=3DC will still return UTF-8 as charset >> when calling nl_langinfo(CHARSET). > > Yes, this solves it: > > $ time LC_ALL=3DC.ASCII grep dog testfile | wc > =A0100000 =A0900000 4500000 > > real =A0 =A00m0.359s > user =A0 =A00m0.279s > sys =A0 =A0 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=3DC.ASCII ! --=20 Jim Reisert AD1C, <jjreisert AT alum DOT mit DOT edu>, http://www.ad1c.us -- 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |