Operating System - HP-UX
1828848 Members
2482 Online
109985 Solutions
New Discussion

Optimized version of netdir_getbyname( ) ?

 
chetan a
Advisor

Optimized version of netdir_getbyname( ) ?

We recently had a problem where netdir_getbyname routine was consuming lot of CPU, even when we had files as backend. Do we have any alternatives for netdir_getbyname (other than gethostbyname) which is less CPU intensive/more optimized ?
I can implement the switch, but switch will be risky :-)
3 REPLIES 3
rick jones
Honored Contributor

Re: Optimized version of netdir_getbyname( ) ?

I didn't even know that HP-UX offered a netdir_getbyname.

How often is it being called?

If you are on Itanium, might be worth getting a copy of caliper: http://www.hp.com/go/caliper

if you are on PA, then:

http://www.hp.com/go/prospect

One shouldn't be modifying code to use gethostbyname() these days anyway - getaddrinfo() is what should be used instead.
there is no rest for the wicked yet the virtuous have no pillows
chetan a
Advisor

Re: Optimized version of netdir_getbyname( ) ?

Ric, Thanks for your suggestions. I couldn't fine any optimized version, so we are using it sparingly now.
I can implement the switch, but switch will be risky :-)
chetan a
Advisor

Re: Optimized version of netdir_getbyname( ) ?

.
I can implement the switch, but switch will be risky :-)