On Wed, 28 Nov 2007 09:44:03 -0600
"Mark Evans" <[EMAIL PROTECTED]> wrote:

> No we are not using NIS.
> 
> it is a large directory i am listing.  actually it is the /usr/home 
> directory, and is probably the largest on the system. However "ls -l"
> runs for close to six minutesand spends the 10 seconds scrolling the
> screen with the results.  so i wait ls to start showing the results
> for about 5 and a half minutes.   Even on a older and much slower
> system i've never seen it talk more than 15 seconds to complete.

Does it run (much) faster with the -f flag or -lf flags?

I have a similar problem with *huge* directories: sorting them is
incredibly slow... though -l makes no difference; it's the sorting
itself than makes one think it is O(N^2) instead of O(N log N).

It could be a pathological case of Quicksort (ls(1) calls fts_open(),
which itself calls fts_sort() from /usr/src/lib/libc/gen/fts.c, and
that function calls qsort(3); so it's not entirely impossible...

-cpghost.

-- 
Cordula's Web. http://www.cordula.ws/
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to