On Tue, Oct 7, 2008 at 8:54 AM, Randy McMurchy <[EMAIL PROTECTED]> wrote: > Valter Douglas Lisbôa Jr. wrote: >> Not a major issue, but a recent thread shows using the make STRIP=yes on >> iana-etc to cut out comments and accelerate the port search on port >> resolution. In the new LSF does anyone remember to put this on the book? > > Not sure about the "accelerate the port search on port resolution". > Here's a quote from Seth's (the maintainer) site: > > To throw out the useful comments in generated files (useful for embedded > installations), use: > > make STRIP=yes > > > He doesn't mention anything about acceleration. He says it's > useful for embedded systems. Do you have a URL of this thread?
Whenever you do a getservbyname(), the glibc resolver has to parse out /etc/services. This happens when you use "http", and the resolver has to decide what port number to use. Likewise, when some program specifies "tcp", the glibc resolver has to parse /etc/protocols to decide what protocol number that corresponds to. So, cutting out the comments just makes the parsing faster. I saw a discussion of this a while ago on a fedora list, but I can't find the link now. You can test this yourself with getent and then try again with a stripped down /etc/services (I didn't bother). $ time { for ((n = 0; n < 100; n++)); do getent services http >/dev/null; done; } real 0m0.098s user 0m0.033s sys 0m0.065s I happen to think the comments are more beneficial than any speedup, but that's just my preference. -- Dan -- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page