lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lynx-dev local directory listing - TOO SLOW


From: Bela Lubkin
Subject: Re: lynx-dev local directory listing - TOO SLOW
Date: Mon, 11 Jan 1999 13:02:49 -0800

Tom Dickey wrote:

> > Amazingly enough Bela Lubkin said: 
> > > I doubt this would make any noticable difference, as long as [ug]id's 
> > > are being cached.  It might also help to use a setpwent(), repeat 
> > > getpwent() loop to fill that cache, rather than specific getpwuid() for 
> > > each new ID.  (But that could cost a lot of memory on systems with large 
> > > /etc/passwd.) 
> 
> that's effective on systems which read the whole passwd file each time it's
> referenced (SunOS and Linux).  not so effective on Solaris.

What I observed this libc doing was, for each getpwuid() call: open
/etc/passwd, read until it finds the desired entry, close, return
information.  It doesn't read the *whole* passwd file when the desired
entry is near the beginning, but it's going to average 1/2 the file.
Anyway, I think it's all the opens and closes that hurt.

But I was testing with a version prior to your cache.  I'm sure it's
better now, and any remaining performance issues are somewhere else.  My
next guess would be all the realloc() calls.

>Bela<

reply via email to

[Prev in Thread] Current Thread [Next in Thread]