bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: grep 2.4.2 takes forever with -v -f


From: devbugs
Subject: Re: grep 2.4.2 takes forever with -v -f
Date: Thu, 30 Sep 2004 19:16:06 GMT

Please include the line below in follow-up emails for this request.

Follow-up:  5490003

Re: grep 2.4.2 takes forever with -v -f

Hello,

Thank you for filing this issue.  Our engineering team has requested some 
additional information, which is necessary to process this report.

* REGRESSION 
Provide information on any steps taken to isolate the problem.

Describe any circumstances where the problem occurs or does not occur, such as 
software versions and/or hardware configurations.

* NOTES 
It would be helpful if you would document any additional information that might 
be useful in resolving the problem, such as references to related problems, 
leads on diagnosis, screen shots, included attachments, and any workarounds.

* CONFIGURATION
A System Profile report in .spx format for issues filed against Mac OS X 10.3 
and higher.
An Apple System Profiler in .asp format for issues filed against Mac OS X 
10.2.8 or prior.  

Thank you for taking the time to provide this information. Your help is greatly 
appreciated.

Best Regards,

Jeff Lemas
Apple Developer Connection
Worldwide Developer Relations

REQUEST ------------------------------------------------------------------------

Hi There,

When I use:

     egrep -v -f out words > left

where out contains

     r.....|.e....|..l...|...i..|....e.|.....f
     u.....|.n....|..d...|...o..|....n.|.....e
  ...
     s.....|.o....|..r...|...t..|....e.|.....d

the program takes up about 15% of the CPU and takes
so long that I have never been patient enough to let
it finish.

When I use DeMorgan's ~(a | b | c) = ~a & ~b & ~c rule I get the
equivalent command sequence:

     egrep -v "r.....|.e....|..l...|...i..|....e.|.....f" words >#1
     egrep -v "u.....|.n....|..d...|...o..|....n.|.....e" #1 > #2
  ...
     egrep -v "s.....|.o....|..r...|...t..|....e.|.....d" #n > left

and the search is pretty much instantaneous.

At first I thought the first version was reading the entire words
file for each line in out, but it takes way too much time even for
that.

  --  p.r.p


DB REFERENCE -------------------------------------------------------------------

TIME IN:                        28-Sep-2004  14:46 PDT
TIME OUT:               30-Sep-2004  09:27 PDT

Copyright 2004, Apple Computer, Inc.

SECURITY: NON-DISCLOSURE USE ONLY








reply via email to

[Prev in Thread] Current Thread [Next in Thread]