Re: Interesting results for getservbyname() performance (and possible changes for /etc/services)

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

 



On Thu, 2006-01-12 at 12:02 +0100, Phil Knirsch wrote:
> Now, i know and understand how and why glibc does the getservbyname() 
> call as it does (namely, every time opening, reading and parsing the 
> file). It neither caches calls nor does any other fancy stuff (how could 
> it? The order in the file is arbitrary, so the only possibility is to do 
> a linear read and parse of the file).

> Comments and suggestions are of course always welcome.

What about writing (or finding) a NS module that does caching? It can
pull from a sorted bdb using a binary search, unless /etc/services is
newer at which point it rebuilds the database. /etc/services almost
*never* changes, so the rebuild speed shouldn't matter too much.

-- 
Ignacio Vazquez-Abrams <ivazquez@xxxxxxxxxxxx>
http://fedora.ivazquez.net/

gpg --keyserver hkp://subkeys.pgp.net --recv-key 38028b72

Attachment: signature.asc
Description: This is a digitally signed message part

-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux