On Sat, Mar 05, 2011 at 03:45:14PM -0800, Jeremy Chadwick wrote: > This is a strange one, and the more I started debugging it (starting > with truss, comparing fast vs. slow results, where all that appears > different is read() operations are taking a lot longer -- I haven't had > time to check with ktrace yet), the more strange it got: that's when I > found out the behaviour changes depending on if you're a user or root. > > Easy to reproduce: > > - grep -r string /usr/src, as non-root, is fast > - grep -r -i string /usr/src, as non-root, is 8x slower than without -i > - grep -r string /usr/src, as root, is fast > - grep -r -i string /usr/src, as root, is fast
This is a stab in the dark, but are there any differences in your shell environment variables between root and non-root? Specifically LANG or LC_ style variables. I ran into issues in the past with grep being horrendously slow and traced it to LANG or LC_* in the environment causing a much longer code path than without the settings. Regards, Gary _______________________________________________ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"