NetBSD Problem Report #53241
From tn@catvmics.ne.jp Tue May 1 04:29:39 2018
Return-Path: <tn@catvmics.ne.jp>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 272947A0D9
for <gnats-bugs@gnats.NetBSD.org>; Tue, 1 May 2018 04:29:39 +0000 (UTC)
Message-Id: <20180501042932.E7A18A100@gw.tn.catvmics.ne.jp>
Date: Tue, 1 May 2018 13:29:32 +0900 (JST)
From: Takeshi Nakayama <nakayama@NetBSD.org>
To: gnats-bugs@NetBSD.org
Subject: grep(1) is too slow in multibyte locale environments
X-Send-Pr-Version: 3.95
>Number: 53241
>Category: bin
>Synopsis: grep(1) is too slow in multibyte locale environments
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue May 01 04:30:02 +0000 2018
>Originator: Takeshi Nakayama
>Release: NetBSD 8.0_RC1
>Organization:
Private
>Environment:
System: NetBSD nyx 8.0_RC1 NetBSD 8.0_RC1 (NYX32) #0:
Fri Apr 20 04:19:57 JST 2018 takeshi@nyx:/sys/arch/sparc64/compile/NYX32 sparc64
Architecture: sparc
Machine: sparc64
>Description:
Wide char support of grep(1) is enabled when grep was moved to
external/gpl2/grep. Since then, grep is too slow in multibyte
locale environments.
I noticed it since updating to 8.0_RC1.
>How-To-Repeat:
$ ls -l /etc/mtree/set.base
-rw-r--r-- 1 root wheel 842084 Apr 22 02:44 /etc/mtree/set.base
$ LC_CTYPE=C time grep uname=root /etc/mtree/set.base >/dev/null
0.04 real 0.02 user 0.00 sys
$ LC_CTYPE=ja_JP.eucJP time grep uname=root /etc/mtree/set.base >/dev/null
39.98 real 38.08 user 0.03 sys
$ LC_CTYPE=ja_JP.UTF-8 time grep uname=root /etc/mtree/set.base >/dev/null
42.70 real 40.97 user 0.00 sys
>Fix:
Possible fix candidates are:
- disable wide char support
- provide switch to enable/disable wide char support (default is disable)
- import newer version of GNU grep (but GPLv3)
(Contact us)
$NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.