pcp
[Top] [All Lists]

PCP Updates: Eliminate Unnecessary Host Name Lookups

To: PCP <pcp@xxxxxxxxxxx>
Subject: PCP Updates: Eliminate Unnecessary Host Name Lookups
From: Dave Brolley <brolley@xxxxxxxxxx>
Date: Wed, 01 May 2013 12:28:34 -0400
Delivered-to: pcp@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4
The following has been pushed to the brolley/dev branch of the pcpfans repository:

commit 5ce967184944cb2e32f676b73036a9d8100221fa
Author: Dave Brolley <brolley@xxxxxxxxxx>
Date:   Wed May 1 12:17:42 2013 -0400

    Don't look up the host name in __pmGetAddrInfo().

    This is not necessary for a few reasons:
    1) The caller of __pmGetAddrInfo already has the host name.
    2) The host name is most often not requested from the resulting
       __pmHostEnt structure.
    3) There already exists __pmHostEntGetName() for this purpose when
       the host name is needed from the __pmHostEnt structure.

    This commit moves the lookup of the host name from __pmGetAddrInfo()
    to __pmHostEntGetName(), where it is done only once (at the first
    request).

<Prev in Thread] Current Thread [Next in Thread>
  • PCP Updates: Eliminate Unnecessary Host Name Lookups, Dave Brolley <=