From owner-freebsd-stable@FreeBSD.ORG Sun Mar 6 07:04:53 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 264B3106566B for ; Sun, 6 Mar 2011 07:04:53 +0000 (UTC) (envelope-from cliftonr@oz.volcano.org) Received: from hrndva-omtalb.mail.rr.com (hrndva-omtalb.mail.rr.com [71.74.56.125]) by mx1.freebsd.org (Postfix) with ESMTP id C2F848FC12 for ; Sun, 6 Mar 2011 07:04:52 +0000 (UTC) X-Authority-Analysis: v=1.1 cv=dquaJDitHqzHCdqWSoZ6IgapSuTzW/4TaRYx9N9k4W8= c=1 sm=0 a=tNKROUZvqFQA:10 a=kj9zAlcOel0A:10 a=G5OLwwqwWgs+1dCEPNHTSw==:17 a=jb__rZ8GAAAA:8 a=H9iEQFZ8AAAA:8 a=fRjtwXCkqojsUOXsa5kA:9 a=iO7SVLa9z9SnrmdaOg1i3Hqc3qAA:4 a=CjuIK1q_8ugA:10 a=sHp_62vNEjwA:10 a=fZFZujrNNEQA:10 a=G5OLwwqwWgs+1dCEPNHTSw==:117 X-Cloudmark-Score: 0 X-Originating-IP: 75.80.196.236 Received: from [75.80.196.236] ([75.80.196.236:30225] helo=oz.volcano.org) by hrndva-oedge01.mail.rr.com (envelope-from ) (ecelerity 2.2.3.46 r()) with ESMTP id 67/5F-14011-312337D4; Sun, 06 Mar 2011 07:04:51 +0000 Received: by oz.volcano.org (Postfix, from userid 1001) id 7291E50824; Sat, 5 Mar 2011 21:04:50 -1000 (HST) Date: Sat, 5 Mar 2011 21:04:50 -1000 From: Clifton Royston To: Jeremy Chadwick Message-ID: <20110306070450.GA92752@lava.net> Mail-Followup-To: Jeremy Chadwick , Gary Palmer , freebsd-stable@freebsd.org References: <20110305234514.GA34594@icarus.home.lan> <20110306024604.GA7746@in-addr.com> <20110306030720.GA99973@icarus.home.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110306030720.GA99973@icarus.home.lan> User-Agent: Mutt/1.4.2.3i Cc: freebsd-stable@freebsd.org Subject: Re: Strange performance issue with grep -r -i as non-root user X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Mar 2011 07:04:53 -0000 On Sat, Mar 05, 2011 at 07:07:20PM -0800, Jeremy Chadwick wrote: ... > $ unset LANG > - Result: still 80x slower with -i > $ unset LANG LC_COLLATE > - Result: still 80x slower with -i > $ unset LANG LC_CTYPE > - Result: normal/fast. > $ unset LC_CTYPE > - Result: still 80x slower with -i > $ unset LC_CTYPE LC_COLLATE > - Result: still 80x slower with -i > $ unset LC_COLLATE > - Result: still 80x slower with -i > > So the LANG + LC_CTYPE combo when used together are what cause this. Doesn't the above say that having either one set does it? I would guess it's probably that either one requires the 8.x grep -i to make a conversion function call for each char (or perhaps line) of input to ensure the proper upper/lower case conversion rules are followed. -- Clifton -- Clifton Royston -- cliftonr@iandicomputing.com / cliftonr@lava.net President - I and I Computing * http://www.iandicomputing.com/ Custom programming, network design, systems and network consulting services