From owner-freebsd-hackers Thu May 24 13:17:44 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from maxim.gbch.net (gw.gbch.net [203.24.22.66]) by hub.freebsd.org (Postfix) with SMTP id 3B16537B422 for ; Thu, 24 May 2001 13:17:38 -0700 (PDT) (envelope-from gjb@gbch.net) Received: (qmail 93236 invoked by uid 1001); 25 May 2001 06:17:33 +1000 Message-ID: X-Posted-By: GJB-Post 2.19 02-May-2001 X-Operating-System: FreeBSD 4.2-RELEASE i386 X-Location: Brisbane, Australia; 27.49841S 152.98439E X-URL: http://www.gbch.net/gjb.html X-Image-URL: http://www.gbch.net/gjb/gjb-auug048.gif X-GPG-Fingerprint: EBB2 2A92 A79D 1533 AC00 3C46 5D83 B6FB 4B04 B7D6 X-PGP-Public-Keys: http://www.gbch.net/keys.html Date: Fri, 25 May 2001 06:17:33 +1000 From: Greg Black To: "Andresen,Jason R." Cc: void , hackers@FreeBSD.ORG Subject: Re: technical comparison References: <20010524082013.G88992-100000@nausicaa.mitre.org> In-reply-to: <20010524082013.G88992-100000@nausicaa.mitre.org> of Thu, 24 May 2001 08:24:29 -0400 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 "Andresen,Jason R." wrote: | 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. And if this imaginary program is going to do that, it's equally easy to use a multilevel directory structure and that will make the life of all users of the system simpler. There's no real excuse for directories with millions (or even thousands) of files. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message