Re: [dev] [sbase] [patch] Optimize 'ls' and add '-U'
Quoth Martti Kühne:
> On Thu, Jul 18, 2013 at 9:00 PM, Galos, David
> <galosd83_AT_students.rowan.edu> wrote:
> > Based on the discussion in 'coreutils / moreutils - DC a directory counter'
> > I have optimized sbase ls to easily handle large directories. The major
> > change is that ls no longer calls 'lstat' on files if it does not have to.
> >
> > This patch also add '-U' which keeps the list from being sorted. When using
> > '-U', ls is constant (except for an argv duplicate) memory.
>
>
> While we're at it, why not fully remove the necessity of wc -l?
Because 'wc -l' is a much better way to do things in the general
case. Remember, "do one thing and do it well". As has already been
discussed to death, it's only very unusually large directories that
using regular ls|wc -l isn't a reasonable thing to do. But even if
it was always slow, this would be the wrong thing to do.
Received on Mon Jul 22 2013 - 10:36:34 CEST
This archive was generated by hypermail 2.3.0
: Mon Jul 22 2013 - 10:48:03 CEST