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:
This is a known bug (UTF-8 processing is much slower). See bug 69900. Try "export LC_ALL=C" before running grep.
*** This bug has been marked as a duplicate of 69900 ***
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.