Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 05 Jul 2002 15:45:24 -0700
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Richard Sharpe <rsharpe@ns.aus.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Adding readdir entries to the name cache ...
Message-ID:  <3D262184.978B902A@mindspring.com>
References:  <Pine.LNX.4.33.0207060620200.3806-100000@ns.aus.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Richard Sharpe wrote:
> On Thu, 4 Jul 2002, Terry Lambert wrote:
> [major snippage, much useful to think about here ...]
> > > However, ls seems to call lstat in the same order that the files are in
> > > the directory, and a normal clock approach to directories would yield
> > > exactly the same result. Further, in the cases that the user did not want
> > > a -l, we would avoid adding many potentially useless names to the name
> > > cache and reducing its performance.
> >
> > This is because the sort occurs first.  An unsorted "ls" (which is
> > available -- see the man page) doesn't have this issue.
> 
> I don't want to start a flame war, but a truss of ls -l shows the
> following:

[ ... ]

> This suggests that the ls is doing an unsorted lookup of the info, and
> then sorting. That is the way I would have done it as well.

My bad; I had assumed that what he said he was observing was
actually what he was observing.  It may be that he's installed
an ls replacement or something, or it could just be an artifact
of the directory he's looking in.

-- Terry

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3D262184.978B902A>