Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #53398

Re: gethostbyname_ex(hostname) extremely slow (crossposted from stackoverflow)

Path csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <torriem+gmail@torriefamily.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.011
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'subject:skip:s 10': 0.07; 'string': 0.09; 'lookup': 0.09; 'skip:/ 10': 0.09; 'slow.': 0.09; 'from:addr:torriem': 0.16; 'from:name:michael torrie': 0.16; 'subject:slow': 0.16; 'two.': 0.16; 'wrote:': 0.18; 'things.': 0.19; 'header:User-Agent:1': 0.23; 'comparing': 0.24; 'server.': 0.24; 'header:In-Reply-To:1': 0.27; 'point': 0.28; 'subject:) ': 0.29; 'addresses': 0.33; 'subject:from': 0.34; 'subject: (': 0.35; 'machine.': 0.36; 'list': 0.37; 'message-id:@gmail.com': 0.38; 'checks': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'email addr:gmail.com': 0.63; 'different': 0.65; 'subject:skip:g 10': 0.84
X-Virus-Scanned amavisd-new at torriefamily.org
Date Sat, 31 Aug 2013 23:06:43 -0600
From Michael Torrie <torriem@gmail.com>
User-Agent Mozilla/5.0 (X11; Linux i686; rv:10.0.12) Gecko/20130105 Thunderbird/10.0.12
MIME-Version 1.0
To python-list@python.org
Subject Re: gethostbyname_ex(hostname) extremely slow (crossposted from stackoverflow)
References <b9f77b6f-3a65-407a-aff5-5677be2ba228@googlegroups.com> <roy-F5C43B.21010031082013@news.panix.com> <48c8f8ca-d8c1-4a60-ba7f-8e8b00993f15@googlegroups.com>
In-Reply-To <48c8f8ca-d8c1-4a60-ba7f-8e8b00993f15@googlegroups.com>
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding 7bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.437.1378012017.19984.python-list@python.org> (permalink)
Lines 10
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1378012017 news.xs4all.nl 15988 [2001:888:2000:d::a6]:52751
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:53398

Show key headers only | View raw


On 08/31/2013 10:51 PM, anntzer.lee@gmail.com wrote:
> It is the call to gethostbyname_ex that is very slow.  The call to
> gethostname is quick (and returns the same string as
> /usr/bin/hostname).

What gethostbyname_ex and /usr/bin/hostname do are very different
things.  gethostbyname_ex does a DNS lookup against a server.
/usr/bin/hostname just checks a local computer setting.  I don't see why
you are comparing the two.  /usr/bin/hostname is not going to help you
find a list of IP addresses that point to a machine.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

gethostbyname_ex(hostname) extremely slow (crossposted from stackoverflow) anntzer.lee@gmail.com - 2013-08-31 17:03 -0700
  Re: gethostbyname_ex(hostname) extremely slow (crossposted from stackoverflow) Roy Smith <roy@panix.com> - 2013-08-31 21:01 -0400
    Re: gethostbyname_ex(hostname) extremely slow (crossposted from stackoverflow) anntzer.lee@gmail.com - 2013-08-31 21:51 -0700
      Re: gethostbyname_ex(hostname) extremely slow (crossposted from stackoverflow) Michael Torrie <torriem@gmail.com> - 2013-08-31 23:06 -0600
        Re: gethostbyname_ex(hostname) extremely slow (crossposted from stackoverflow) anntzer.lee@gmail.com - 2013-09-01 10:13 -0700
      Re: gethostbyname_ex(hostname) extremely slow (crossposted from stackoverflow) Roy Smith <roy@panix.com> - 2013-09-01 06:57 -0400
  Re: gethostbyname_ex(hostname) extremely slow (crossposted from stackoverflow) Chris Angelico <rosuav@gmail.com> - 2013-09-01 21:37 +1000
    Re: gethostbyname_ex(hostname) extremely slow (crossposted from stackoverflow) anntzer.lee@gmail.com - 2013-09-01 13:37 -0700
      Re: gethostbyname_ex(hostname) extremely slow (crossposted from stackoverflow) Chris Angelico <rosuav@gmail.com> - 2013-09-02 07:03 +1000
        Re: gethostbyname_ex(hostname) extremely slow (crossposted from stackoverflow) anntzer.lee@gmail.com - 2013-09-01 22:28 -0700
          Re: gethostbyname_ex(hostname) extremely slow (crossposted from stackoverflow) Chris Angelico <rosuav@gmail.com> - 2013-09-02 20:42 +1000
          Re: gethostbyname_ex(hostname) extremely slow (crossposted from stackoverflow) Roy Smith <roy@panix.com> - 2013-09-02 08:45 -0400
            Re: gethostbyname_ex(hostname) extremely slow (crossposted from stackoverflow) anntzer.lee@gmail.com - 2013-09-02 10:52 -0700
              Re: gethostbyname_ex(hostname) extremely slow (crossposted from stackoverflow) Chris Angelico <rosuav@gmail.com> - 2013-09-03 07:12 +1000

csiph-web