FS#7141 - grep is extremely slow
Attached to Project:
Arch Linux
Opened by Xavier (shining) - Saturday, 12 May 2007, 22:05 GMT
Last edited by Tobias Powalowski (tpowa) - Saturday, 08 December 2007, 11:42 GMT
Opened by Xavier (shining) - Saturday, 12 May 2007, 22:05 GMT
Last edited by Tobias Powalowski (tpowa) - Saturday, 08 December 2007, 11:42 GMT
|
Details
It has been reported in several places, see for example
debian report :
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=181378 From their changelog : * Patched 64-egf-speedup.patch with patch from Nicolas François <nicolas.francois@centraliens.net>. Put 64-egf-speedup.patch, 65-dfa-optional.patch, 66-match_icase.patch and 67-w.patch back you can get debian patches from there : http://ftp.debian.org/debian/pool/main/g/grep/grep_2.5.1.ds2-6.diff.gz then just run somewhere : zcat grep_2.5.1.ds2-6.diff.gz | patch -p1 and above patches will be available in debian/patch or maybe rather directly from fedora cvs, since it looks like they come from there anyway : http://cvs.fedora.redhat.com/viewcvs/devel/grep/ Apparently, these patches were also proposed to upstream. See the four Red Hat's patch on this page: http://savannah.gnu.org/patch/?group=grep |
This task depends upon
Closed by Tobias Powalowski (tpowa)
Saturday, 08 December 2007, 11:42 GMT
Reason for closing: Fixed
Additional comments about closing: in new grep package
Saturday, 08 December 2007, 11:42 GMT
Reason for closing: Fixed
Additional comments about closing: in new grep package
So I tried all 15 patches in the order found in this file:
http://cvs.fedora.redhat.com/viewcvs/devel/grep/grep.spec?view=markup
and it fixed the problem.
Wouldn't all these other patches be of interest as well?
I mean, they were made for a reason, and they aren't specific to fedora.
At the minimum, for these 4 patches (number 3,10,11,13) to apply cleanly without editing,
I had to apply the first 3 as well.
So I applied patch numbers 0,1,2,3,10,11,13
I am back on 286.77 sec with utf8 locale, compared to 0.10 sec otherwise. So close to 3000x slower.
It's just that this diff.gz is less practical to work with.
http://ftp.debian.org/debian/pool/main/g/grep/grep_2.5.3~dfsg-3.diff.gz
And there is actually only one patch needed from that diff.gz to totally fix the performance issue :
64-egf-speedup.patch
It's similar to the 09-egf-speedup.patch from fedora cvs, except that it applies cleanly.
Or nearly, for some very weird reason, that patch has a buggy 107th line which needs to be removed :
#@@ -303,47 +282,78 @@ hunk6
The only grep debian patch we need is the only one to have this problem...
Attaching the patch without the buggy line.
I am back on 286.77 sec with utf8 locale, compared to 0.10 sec otherwise. So close to 3000x slower.