Path: utzoo!attcan!ncrcan!brambo!camtwh!morgan From: morgan@camtwh.UUCP (Morgan W. Jones) Newsgroups: comp.sys.amiga.tech Subject: Re: AmigaDos directory knowledge Message-ID: <235@camtwh.UUCP> Date: 1 Dec 89 19:07:12 GMT References: <88.filbo@gorn.santa-cruz.ca.us> <8742@cbmvax.UUCP> Reply-To: morgan@camtwh.UUCP (Morgan Jones) Organization: Orama Incorporated, Toronto, Canada. Lines: 33 In article andrewt@watsnew.waterloo.edu (Andrew Thomas) writes: >with my rankings). Under the above example, you lose bigtime with >Amiga's file system, as all of these examples are equivalent to >wildcarding. I can't complain about finding my commands quickly, but >any shell that hashes its path will speed that up after the first time >anyway. Why is AmigaDOS castrating its interactive use in favour of >fast command lookup, when the fast command lookup will only effect the >initial use of a command? You see a saving on command lookup for each and every invocation, and caching has nothing to do with this. The purpose of caching is so that you don't have to scan the whole filesystem (or at least those directories listed in your path) every time that you execute your command. Once the command is found and executed, the shell remembers the path to the command but the operating system still has to search all of the directories in the path to find the inode (or file handle on the amiga) for the file. Where the amiga gains is in the directory search. MessyDos and Unix have to do a linear search on the directory (which for large directories may involve several disk accesses) whereas the amiga does a hashed lookup (which is usually one or two disk accesses). If the path to the file is several levels deep, the number of disk accesses would be significantly reduced. All this aside, though, I do agree that the minor (and on a HD insignificant) increase in direct access time does not justify the horrifically slow directory listings. -- Morgan W. Jones (morgan@camtwh) Orama Incorporated, Toronto, Canada. (416) 369-5088