• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: About that host name resolution slowness
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: About that host name resolution slowness


  • Subject: Re: About that host name resolution slowness
  • From: Allan Nathanson <email@hidden>
  • Date: Wed, 2 Jun 2004 12:47:56 -0400

On Jun 2, 2004, at 12:20 PM, Stephane Sudre wrote:

On mercredi, juin 2, 2004, at 06:02 PM, Quinn wrote:

At 17:46 +0200 2/6/04, Stephane Sudre wrote:
Stupid question: has something be made (new API, mechanism, etc...) in Panther to improve the speed and thread safety of gethostbyname()?

Mac OS X 10.3 introduces a new API, CFHost, that allows you to do asynchronous lookup.

<http://developer.apple.com/samplecode/CFHostSample/CFHostSample.html>

This should solve your threading issue. As to the speed, well that's an entirely separate problem.

Speed is the top priority (i.e. I can give up the thread part if needed) as I think I don't need all the extra work made by gethostbyname to try to get an answer and a good one.

I will have a look at the res_query API suggested by J. Graessley.

Having to parse the answer (hoping that there's a RCF and it's respected) is a minor pain if I can gain speed.

While I can understand your desire for speed I would like to make sure you are not making any bold assumptions that a remote DNS server should respond to a query in some finite amount of time. Yes, ideally, all of our name-->address queries would return in less than a second. Unfortunately, there some DNS servers that can be SLOW TO RESPOND and the amount of network bandwidth available may be limited. If your application says "give up after one second" then you'll miss out on all of the queries that are answered one second after you've given up. This is one reason why people have suggested you look towards asynchronous solutions.

- Allan
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: About that host name resolution slowness
      • From: Stephane Sudre <email@hidden>
References: 
 >Re: About that host name resolution slowness (From: Stephane Sudre <email@hidden>)

  • Prev by Date: Re: About that host name resolution slowness
  • Next by Date: Re: About that host name resolution slowness
  • Previous by thread: Re: About that host name resolution slowness
  • Next by thread: Re: About that host name resolution slowness
  • Index(es):
    • Date
    • Thread