Long filenames

Fuat C. Baran fuat at cunixc.cc.columbia.edu
Fri Jun 9 05:57:28 AEST 1989


In article <FLEE.89Jun8143358 at shire.cs.psu.edu> flee at 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 at columbia.edu          U.S. MAIL: Columbia University
BITNET:   fuat at 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



More information about the Comp.unix.wizards mailing list