Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 283149 - sys-apps/grep-2.5.4-r1: bad grep unicode performance
Summary: sys-apps/grep-2.5.4-r1: bad grep unicode performance
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-29 19:09 UTC by Robin Johnson
Modified: 2011-01-29 19:38 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-08-29 19:09:20 UTC
Looks like the unicode performance has regressed on grep again :-(.

# find /usr/portage >/dev/shm/portage.files
# wc -l /dev/shm/portage.files
177885 /dev/shm/portage.files

# time LANG=C grep -c Manifest /dev/shm/portage.files
13818

real	0m0.015s
user	0m0.007s
sys	0m0.010s

# time LANG=en_US.UTF-8 grep -c Manifest /dev/shm/portage.files
13818

real	0m8.778s
user	0m8.773s
sys	0m0.003s
Comment 1 SpanKY gentoo-dev 2009-08-29 21:04:52 UTC
that's because the trade off comes at the cost of correctness.  every unicode speedup patch in the past introduced subtle incorrect behavior.  i'm not going to include a patch (even if USE optional) with these trade offs.

pretty sure this is in upstream savannah (if it isnt, it's a known issue by people), and there's nothing we're going to do about it ...
Comment 2 SpanKY gentoo-dev 2011-01-29 19:38:50 UTC
this is fixed with grep-2.7

$ grep --version
GNU grep 2.5.4

$ time LANG=C grep -c Manifest /dev/shm/portage.files
real    0m0.010s
$ time LANG=en_US.UTF8 grep -c Manifest /dev/shm/portage.files
real    0m7.241s

$ time LANG=en_US.UTF8 /var/tmp/portage/sys-apps/grep-2.7/image/bin/grep -c Manifest /dev/shm/portage.files
real    0m0.026s