URL:
  <http://savannah.gnu.org/bugs/?21001>

                 Summary: Grep is TOO slow in some locales.
                 Project: grep
            Submitted by: None
            Submitted on: Friday 09/07/2007 at 23:07 UTC
                Category: None
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

Hi, this was already submitted as bug #14472, but i would like to
stress the severity of the problem. It takes 6s for grep to go through a 550K
text file in my machine when locale is set to en_US.UTF-8. When the locale is
set to C, the time is 0.007s.
Details below.

Thanks,
Apuã



[EMAIL PROTECTED]:~$ uname -a
Linux blimunda 2.6.22 #1 PREEMPT Sun Sep 2 12:24:33 BRT 2007 i686 GNU/Linux
[EMAIL PROTECTED]:~$ grep --version
GNU grep 2.5.3

Copyright (C) 1988, 1992-2002, 2004, 2005  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


[EMAIL PROTECTED]:~$ ls -la file.txt 
-rw-r--r-- 1 apua apua 577571 2007-09-07 19:29 file.txt

[EMAIL PROTECTED]:~$ time LC_ALL=C grep 'sci' file.txt  > /dev/null

real    0m0.007s
user    0m0.005s
sys     0m0.002s

[EMAIL PROTECTED]:~$ time LC_ALL=en_US.UTF-8 grep 'sci' file.txt  > /dev/null

real    0m6.101s
user    0m5.147s
sys     0m0.065s





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?21001>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/



Reply via email to