Bug 90956 - Severe performance problem in grep .
Summary: Severe performance problem in grep .
Keywords:
Status: CLOSED DUPLICATE of bug 69900
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: grep
Version: 9
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-05-15 19:12 UTC by bmisener
Modified: 2006-02-21 18:53 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-02-21 18:53:03 UTC
Embargoed:


Attachments (Terms of Use)

Description bmisener 2003-05-15 19:12:47 UTC
Description of problem:

Performance EXTREAMLY slow in grep and egrep . Have file :
-rw-rw-r--    1 bryant   bryant    9152309 May 15 13:29 total_hash_all_env_log
with 136595 lines of 67 charagers / line. 
Running grep prd1dhi /tmp/total_hash_all_env_log | wc -l   - takes about 
5 min 42 seconds. Just a wc -l /tmp/....  takes about 1-2 seconds.

If I run a cat /tmp/total_hash_all_env_log | perl -e 'while ( <> ) { 
 print if /prd1dhi/ ;} ' | wc -l   takes about 3 seconds.

If we just do a  time cat /tmp/total_hash_all_env_log >/dev/null this takes 
only 0.08 seconds..

There are 45549 matching lines in the file.

This file is examined often... and 5 minutes is ridiculous. On a redhat 6.2
system that we have it takes about 3 seconds.

We have tried this on different machines with RedHat 9.0 installed on them, it
is the same on all...

Version-Release number of selected component (if applicable):

grep if from grep-2.5.1-7 .

How reproducible:

100% so far.

Steps to Reproduce:
1. Run commands above - with time if desired....
2.
3.
    
Actual results:

The results are correct as far as the number of lines its just takes 114 time
longer to get the answer.

Expected results:


Additional info:

Comment 1 Peter van Egdom 2003-05-15 20:51:28 UTC
This is a known bug (UTF-8 processing is much slower).
See bug 69900.

Try "export LC_ALL=C" before running grep.

Comment 2 Tim Waugh 2003-05-15 21:55:53 UTC

*** This bug has been marked as a duplicate of 69900 ***

Comment 3 Red Hat Bugzilla 2006-02-21 18:53:03 UTC
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.


Note You need to log in before you can comment on or make changes to this bug.