bug-grep
[Top][All Lists]
Advanced

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

[bug #21001] Grep is TOO slow in some locales.


From: anonymous
Subject: [bug #21001] Grep is TOO slow in some locales.
Date: Fri, 07 Sep 2007 23:07:48 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.6) Gecko/20070723 Iceweasel/2.0.0.6 (Debian-2.0.0.6-1)

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Ć£



address@hidden:~$ uname -a
Linux blimunda 2.6.22 #1 PREEMPT Sun Sep 2 12:24:33 BRT 2007 i686 GNU/Linux
address@hidden:~$ 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.


address@hidden:~$ ls -la file.txt 
-rw-r--r-- 1 apua apua 577571 2007-09-07 19:29 file.txt

address@hidden:~$ time LC_ALL=C grep 'sci' file.txt  > /dev/null

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

address@hidden:~$ 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

[Prev in Thread] Current Thread [Next in Thread]