I ran your program on Leopard, and the response times averaged around 6 seconds! I was very surprised by this, and the results were not duplicated by a Windows machine on the local network. So, I did my own test. I changed your host file's line endings to Unix and ran the following command:
The response times here are an order of magnitude (or two) better than what your program is saying. I don't know why the response times are so slow with your program, but they aren't indicative of a slow DNS server here.
Note that we have a DNS server set up on our local network.
Odd Query Times
I ran your program on Leopard, and the response times averaged around 6 seconds! I was very surprised by this, and the results were not duplicated by a Windows machine on the local network. So, I did my own test. I changed your host file's line endings to Unix and ran the following command:
sed 's/http\:\/\///g' domains.txt | xargs -n 1 dig | awk '/Query time/ { print $4 }'
The response times here are an order of magnitude (or two) better than what your program is saying. I don't know why the response times are so slow with your program, but they aren't indicative of a slow DNS server here.
Note that we have a DNS server set up on our local network.