Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 Jul 2007 20:20:09 GMT
From:      "Vyacheslav Silakov" <seal@inar.ru>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/112613: 'ls -l' is very slow or doesn't work at all
Message-ID:  <200707012020.l61KK9J5088188@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/112613; it has been noted by GNATS.

From: "Vyacheslav Silakov" <seal@inar.ru>
To: <bug-followup@FreeBSD.org>
Cc:  
Subject: Re: bin/112613: 'ls -l' is very slow or doesn't work at all
Date: Sun, 1 Jul 2007 23:57:45 +0400

 Ok... ;)
 
 I've a look into ls.c.
 It seems to be a performance problem around string #702
 [...]
 user = user_from_uid(sp->st_uid, 0);
 [...]
 
 My /etc/passwd contains about 10,000 records and /var/mail directory
 contains about 10,000 mailboxes. Probably 'user_from_uid' function is doing
 something wrong.
 
 Original timing:
 # time ls -l /var/mail
 [...]
     1572.20 real       133.71 user       790.94 sys
 
 But when I'm changed 
 user = user_from_uid(sp->st_uid, 0);
 to
 user = "blablabla";
 result is:
 
 # time ./ls -l /var/mail
 [...]
        17.01 real         0.20 user         0.22 sys
 
 p.s. 'deco' program works fine because it doesn't use 'user_from_uid'
 function calls.
 
 
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200707012020.l61KK9J5088188>