View Full Version : gethostbyname() execution time
10-17-2005, 03:13 AM
I was recently testing some PHP code and found that a single line using gethostbyname() to fill a single variable was taking up about 3.5 seconds to execute.
Is this PHP function usually so slow?
10-17-2005, 05:31 PM
no , even on my win32 dev machine on std ADSL the lookup time is not noticible & subsequent requests appear to be cached.
10-17-2005, 09:01 PM
Most of the time it executed it would take about 0.0002ms. About every 3rd run of the code that one line would take an average of 3.5 seconds to execute.
This was on a Windows test server, though there was a lot of internet traffic in the background, the CPU was barely being used.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.