#1162: Slowdown due to gethostbyname ---------------------+------------------------------------------------------ Reporter: hinder | Owner: Type: defect | Status: reviewed_ok Priority: minor | Milestone: Component: Cactus | Version: Resolution: | Keywords: ---------------------+------------------------------------------------------ Changes (by hinder):
* status: review => reviewed_ok
Comment:
Thanks. This reduces the time taken to run the tests from 7m8s to 1m56s. "ping macbook" takes 5 seconds to fail. I don't know why this is; it sounds like a system configuration or OS error.
Please apply.
Regarding the patch,
* Can the passed in "length" variable be used to set the size of the name string, rather than setting it to 100? We now require C99, which requires this feature, but http://en.wikipedia.org/wiki/Variable-length_array says that variable-length automatic arrays are only an optional feature in C11, the newest C standard. Do we use VLAs in other thorns? If we are concerned about not having them available, we should provide an autoconf test for them. * The logic in the patch doesn't seem to warn if a truncated name is copied from name to returned_name due to returned_name being too small.