Strange performance issue with grep -r -i as non-root user
Clifton Royston
cliftonr at lava.net
Sun Mar 6 07:04:53 UTC 2011
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 at iandicomputing.com / cliftonr at lava.net
President - I and I Computing * http://www.iandicomputing.com/
Custom programming, network design, systems and network consulting services
More information about the freebsd-stable
mailing list