X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 	tests=AWL,BAYES_00,SPF_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <4AF393C6.3000505@tlinx.org>
Date: Thu, 05 Nov 2009 19:11:02 -0800
From: Linda Walsh <cygwin@tlinx.org>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.22) Gecko/20090605 Lightning/0.9 Thunderbird/2.0.0.22 ThunderBrowse/3.2.6.5 Mnenhy/0.7.6.666
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: 1.7] BUG - GREP slows to a crawl with large number of matches on a  single file
References: <26224019.post@talk.nabble.com>
In-Reply-To: <26224019.post@talk.nabble.com>
X-Stationery: 0.4.10
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

aputerguy wrote:
> Running grep on a 20MB file with ~100,000 matches takes an incredible almost
> 8 minutes under Cygwin 1.7 while taking just 0.2 seconds under Cygwin 1.5
> (on a 2nd machine).
---
	I've seen nasty behavior with grep that isnt' cygwin 
specific.  Try "pcregrep" and see if you have the same issue.

	I found it to be about ~100 times faster under _some_ searches
though 2-3x is more typical. The gnu re-parser isn't real 
efficient under some circumstances.  

	If you find a big difference, you might also want to report
it to the bug-grep@gnu.org mailing list, but last time I did,
they told me "that's the way it is" due to some posix conformance
thing...

-l

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

