https://bugzilla.novell.com/show_bug.cgi?id=353718 Summary: very slow filtering algorithm in grep .. Product: openSUSE 10.3 Version: Final Platform: 32bit OS/Version: openSUSE 10.3 Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: root@proximasociale.cz QAContact: qa@suse.de Found By: --- Created an attachment (id=190461) --> (https://bugzilla.novell.com/attachment.cgi?id=190461) no problem on ubuntu and suse i have tested following commands on several machines using by distribution differing operating system:: ------------------------------------------------------------------------------
echo $(find /home/nettezzaumana/Desktop/ | grep -v smf &>/dev/null) & time wait [1] 5536
[1]+ Done echo $(find /home/nettezzaumana/Desktop/ | grep -v smf &>/dev/null) real 0m3.442s user 0m3.396s sys 0m0.024s
echo $(find /home/nettezzaumana/Desktop/ | sed '/smf/d' &>/dev/null) & time wait [1] 5548
[1]+ Done echo $(find /home/nettezzaumana/Desktop/ | sed '/smf/d' &>/dev/null) real 0m0.063s user 0m0.044s sys 0m0.016s excluded 'smf' item is folder with source of SMF forum in php (5.7MB, 1551 items) ------------------------------------------------------------------------------
echo $(find /usr/src/linux-2.6.22.13-0.3 | sed '/\.c$/!d') &>/dev/null & time wait echo $(find /usr/src/linux-2.6.22.13-0.3 | egrep '\.c$') &>/dev/null & time wait show 13x faster sed over grep
`for x in $(find /etc/init.d); do if [ ! -d "$x" ]; then sed '/^#/!d' $x; fi; done &>/dev/null` & time wait `for x in $(find /etc/init.d); do if [ ! -d "$x" ]; then grep -E '^#' $x; fi; done &>/dev/null` & time wait 7x faster sed over grep
in attachment is negative reproduction on Ubuntu & ArchLinux.. my:: GNU grep 2.5.2 GNU sed version 4.1.5 2.6.22.13-0.3-default // SuSE 10.3 Best Regards by nettezzaumana -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.