Bug 515047 - grep ......... large-file.txt is Very slow with en_US.UTF-8
Summary: grep ......... large-file.txt is Very slow with en_US.UTF-8
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: grep
Version: 11
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Jaroslav Škarvada
QA Contact: Fedora Extras Quality Assurance
URL: http://savannah.gnu.org/bugs/?14472
Whiteboard:
: 522125 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-08-01 08:32 UTC by Nathan G. Grennan
Modified: 2010-06-15 16:06 UTC (History)
5 users (show)

Fixed In Version: grep-2.6.3-1.fc11
Clone Of:
Environment:
Last Closed: 2010-06-15 16:06:56 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Nathan G. Grennan 2009-08-01 08:32:16 UTC
Description of problem:
I have a 475mb text file with 40,532,676 lines. I am trying to only get lines with more than eight characters. With en_US.UTF-8 "grep .......... large-file.txt" took about 2 hours and 27 minutes to process to the point of 162mb of results. If I change it from en_US.UTF-8 to C it takes 9 seconds to produce all 420mb. Which by my rough calculations means it is about 2538x slower.

Version-Release number of selected component (if applicable):
grep-2.5.3-4.fc11.x86_64

How reproducible:
Everytime

Steps to Reproduce:
1. time grep ......... large-file.txt
  
Actual results:
Extremely slow

Expected results:
Extremely fast

Additional info:

Comment 1 Nathan G. Grennan 2009-08-01 08:39:13 UTC
I found another bug report that sounded like mine, and it suggested that LC_ALL=C would help, even if LANG=en_US.UTF-8. It did help, though is still slower than LANG=C. With LC_ALL=C and LANG=en_US.UTF-8 it took 19 seconds.

Comment 2 H.J. Lu 2009-09-09 14:31:49 UTC
*** Bug 522125 has been marked as a duplicate of this bug. ***

Comment 3 H.J. Lu 2009-09-09 14:32:34 UTC
This is a regression against grep-2.5.1a-61.fc10.

Comment 4 Jaroslav Škarvada 2010-03-30 13:56:29 UTC
Fixed in grep-2.6.1 in rawhide, I am going to also build it for F11.

I generated wordlist with 44957781 lines, 440M in size, running grep:

$ time LC_ALL=en_US.UTF-8 grep 1master1 list.txt

real	0m10.368s
user	0m0.609s
sys	0m0.508s

$ time LC_ALL=C grep 1master1 list.txt

real	0m9.454s
user	0m0.500s
sys	0m0.458s

Looks good.

Comment 5 H.J. Lu 2010-03-30 15:36:49 UTC
(In reply to comment #4)
> Fixed in grep-2.6.1 in rawhide, I am going to also build it for F11.
> 
> I generated wordlist with 44957781 lines, 440M in size, running grep:
> 
>

Please also build for F12. Thanks.

Comment 6 Jaroslav Škarvada 2010-03-30 16:03:21 UTC
Sorry I didn't mention it, but for F12, F13 it was recently pushed through Bodhi.

Comment 7 Fedora Update System 2010-03-31 14:08:25 UTC
grep-2.6.1-1.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/grep-2.6.1-1.fc11

Comment 8 Fedora Update System 2010-04-03 04:43:54 UTC
grep-2.6.1-1.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update grep'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/grep-2.6.1-1.fc11

Comment 9 Fedora Update System 2010-04-07 22:17:27 UTC
grep-2.6.3-1.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/grep-2.6.3-1.fc11

Comment 10 Fedora Update System 2010-04-10 10:29:46 UTC
grep-2.6.3-1.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update grep'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/grep-2.6.3-1.fc11

Comment 11 Bug Zapper 2010-04-28 09:30:44 UTC
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '11'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 11's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 11 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 12 Fedora Update System 2010-06-15 16:06:27 UTC
grep-2.6.3-1.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.


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