From owner-freebsd-hackers Thu May 24 6:32:10 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from smtpproxy1.mitre.org (mb-20-100.mitre.org [129.83.20.100]) by hub.freebsd.org (Postfix) with ESMTP id 3A66237B423 for ; Thu, 24 May 2001 06:32:06 -0700 (PDT) (envelope-from jandrese@mitre.org) Received: from avsrv1.mitre.org (avsrv1.mitre.org [129.83.20.58]) by smtpproxy1.mitre.org (8.9.3/8.9.3) with ESMTP id JAA25280 for ; Thu, 24 May 2001 09:31:53 -0400 (EDT) Received: from mailsrv2.mitre.org (mailsrv2.mitre.org [129.83.221.17]) by smtpsrv1.mitre.org (8.9.3/8.9.3) with ESMTP id JAA26561 for ; Thu, 24 May 2001 09:31:52 -0400 (EDT) Received: from nausicaa.mitre.org ([128.29.105.85]) by mailsrv2.mitre.org (Netscape Messaging Server 4.15) with ESMTP id GDUDL400.UYO; Thu, 24 May 2001 09:31:52 -0400 Date: Thu, 24 May 2001 08:24:29 -0400 (EDT) From: "Andresen,Jason R." To: void Cc: Subject: Re: technical comparison In-Reply-To: <20010524003731.B25053@firedrake.org> Message-ID: <20010524082013.G88992-100000@nausicaa.mitre.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, 24 May 2001, void wrote: > On Wed, May 23, 2001 at 09:20:51AM -0400, Andresen,Jason R. wrote: > > > > Why is knowing the file names cheating? It is almost certain > > that the application will know the names of it's own files > > (and won't be grepping the entire directory every time it > > needs to find a file). > > With 60,000 files, that would have the application duplicating > 60,000 pieces of information that are stored by the operating system. > Operations like open() and unlink() still have to search the directory > to get the inode, so there isn't much incentive for an application to > do that, I think. This still doesn't make sense to me. It's not like the program is going to want to do a "find" on the directory every time it has some data it wants to put somewhere. I think for the majority of the cases (I'm sure there are exceptions) an application program that wants to interact with files will know what filename it wants ahead of time. This doesn't necessarily mean storing 60,000 filenames either, it could be something like: I have files fooX where X is a number from 00000 to 60000 in that directory. I need to find a piece of information, so I run that information through a hash of some sort and determine that the file I want is number 23429, so I open that file. I don't expect programs to try to offload this sort of information on the filesystem. Do you have an example of a program that interacts with the filesystem without knowing the names of the files it wants? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message