Path: utzoo!attcan!uunet!cs.utexas.edu!sun-barr!rutgers!columbia!cunixc!fuat From: fuat@cunixc.cc.columbia.edu (Fuat C. Baran) Newsgroups: comp.unix.wizards Subject: Re: Long filenames Message-ID: <1579@cunixc.cc.columbia.edu> Date: 8 Jun 89 19:57:28 GMT References: <106326@sun.Eng.Sun.COM> <4315@ficc.uu.net> <338@arc.UUCP> <629@crdgw1.crd.ge.com> <4439@ficc.uu.net> Reply-To: fuat@cunixc.cc.columbia.edu (Fuat C. Baran) Organization: Columbia University Center for Computing Activities Lines: 20 In article flee@shire.cs.psu.edu (Felix Lee) writes: >'ls' takes forever only if you use the '-l', '-F', or similar options >that have to stat() each file. 'ls' without those options is >marginally slower than 'sort'. One reason that "ls -l" is slow on some systems is because of the getpwuid() call to figure out the file owner's name. This is a problem on systems were these lookups don't go through dbm but by opening /etc/passwd and reading entries. To see how slow it can get, try doing an "ls -l" in /usr/spool/mail on a large system with lots of unread mail. I remember seeing this take 25 minutes on our VAX 8700 running Ultrix 2.0. We then replaced the getpw* family of routines with dbm'ized versions and the time dropped to under a minute. --Fuat -- INTERNET: fuat@columbia.edu U.S. MAIL: Columbia University BITNET: fuat@cunixc.cc.columbia.edu Center for Computing Activities USENET: ...!rutgers!columbia!cunixc!fuat 712 Watson Labs, 612 W115th St. PHONE: (212) 854-5128 New York, NY 10025