ares_gethostbyname() is slow on some Windows machines
source link: http://siongui.github.io/2014/09/12/ares-gethostbyname-is-slow-on-some-windows-machines/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
ares_gethostbyname() is slow on some Windows machines
September 12, 2014
The function ares_gethostbyname() in c-ares library, as of version 1.10.0, is slow on some Windows machines.
The more unconnected network interface the machine has, the slower the DNS lookup may be.
This pull request intended to solve this issue, although it is not merged into code base yet.
Per Microsoft's document on GetAdaptersAddresses function, GetAdaptersAddresses(), called by get_DNS_AdaptersAddresses() in c-ares library,
Thus it makes sense to postpone calls to get_DNS_AdaptersAddresses() later. The only concern is that I'm not sure whether the functionality is still correct or not.is implemented only as a synchronous function. The GetAdaptersAddresses function requires a significant amount of network resources and time to complete since all of the low-level network interface tables must be traversed.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK