Re: grep -r speed fc2 vs. rh 6.1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tim Waugh wrote, On 12/19/2004 05:40 AM:
On Sun, Dec 19, 2004 at 01:13:49AM -0500, Gene Smith wrote:


I have the same huge source tree on fc2 500Mhz Athlon with IDE drive and on a old hp vectra 200Mhz with Pentium pro and scsi drive running rh 6.1 with ext2. A "grep -r" for the same string on the vectra takes about about a third as long to return results as compared to the somewhat "faster" Athlon/IDE/ext3 system running fc2. However, building the tree (and most everything else) takes longer on the vectra by a noticeable amount.

Both are running grep from a kde "konsole" in their respective kde environments. Is it possible that fc2 gives grep and possibly similar commands a lower priority than rh 6.1 gives? Or is it the scsi drives or ext2 (on rh 6.1) vs IDE and ext3 I am using on fc2?


Try the grep package from FC3 updates -- I think it should work okay
on FC2 as well.

Upgraded to grep-2.5.1-31.i386.rpm from a FC3 mirror and see no improvement on my FC2 system.



It'll be because you're running in a non-C locale, and so grep is obliged to perform more work to get locale sorting order correct. The efficiency for UTF-8 processing has been improved in the FC3 updates package.

As C. Simpson suggested, setting env LC_ALL=C speeds it up so it is faster than the old vectra with rh6. Is there any downside to just setting "export LC_ALL=C" in ~/.bash_profile ?


For the record, here is the speeds I am seeing on FC2 (with either grep version) searching the same tree for the same string (with no changes to .bash_profile):

With "env FC_ALL=C grep -r my_string ." : 25-30 seconds
With "grep -r my_string ."              : 2min 15seconds.


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux