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:
Nicholas Clark
Date:
January 26, 2001 15:40
Subject:
Re: gethostbyname (was Re: Does perl really need to use sigsetjmp? (18% performance hit))
Message ID:
20010126234018.E27676@plum.flirble.org
On Fri, Jan 26, 2001 at 11:33:56PM +0000, Alan Burlison wrote:
> 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

I said rapidly copies. That was all :-)
I was aware that DNS lookup can be several seconds (or tens of)

> lookup?  Or a DNS lookup?  What happens if I call a third party library
> that does name lookup as well?

Stuffed at that point.

> Simple answer - No.

On the basis that it only cures some of the symptoms (perl would no longer
clash with perl using gethostbyname) but not the disease
("perl5's threading is irrevocably broken" I think that the term was
Are you going to put that in an X mail header?)

Nicholas Clark

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