develooper Front page | perl.perl5.porters | Postings from January 2001

Re: gethostbyname (was Re: Does perl really need to use sigsetjmp? (18% performance hit))

Thread Previous | Thread Next
From:
Alan Burlison
Date:
January 26, 2001 15:34
Subject:
Re: gethostbyname (was Re: Does perl really need to use sigsetjmp? (18% performance hit))
Message ID:
3A720964.D71CC768@uk.sun.com
Nicholas Clark wrote:

> Hmm. Maybe I'm missing something here. (I don't know much about threads)
> perl rapidly copies the data returned by gethostbyname into SVs
> If threaded perl had a gethostbyname mutex so that only one thread at
> a time could get into the area referencing the call to gethostbyname()
> and the returned (possibly static) structure, would this solve the
> problem (at least within perl, provided extengethostbynamesions don't call gethostbyname)

Rapidly?  What happens if gethostbyname needs a NIS lookup?  Or an LDAP
lookup?  Or a DNS lookup?  What happens if I call a third party library
that does name lookup as well?

Simple answer - No.

Alan Burlison

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About