Re: NLS/strerror efficiency

From: Kostik Belousov <kostikbel_at_gmail.com>
Date: Sat, 23 Jan 2010 21:38:35 +0200
On Sun, Jan 24, 2010 at 04:18:48AM +0900, Hajimu UMEMOTO wrote:
> Hi,
> 
> >>>>> On Wed, 20 Jan 2010 10:20:15 +0100
> >>>>> Gabor Kovesdan <gabor_at_FreeBSD.org> said:
> 
> gabor> El 2010. 01. 19. 22:20, Kostik Belousov escribi?$(D+Q:
> > Hi,
> > r189765 enabled NLS support for libc. Now, any strerror(3) call causes
> > 4 (!) failing stat(2) calls. I think this is untolerable.
> >
> > Catopen() does not cache the catalog descriptor, at least for libc,
> > at least for the case where the open failed.
> >    
> gabor> Hi Kostik,
> 
> gabor> thank you for pointing this out. I'll check the code to see how we could 
> gabor> add a caching for the failing catalogs. I'll post the patch here when 
> gabor> I'm done.
> 
> The gai_strerror(3) has same issue.  How about the attached patch in
> this mail?

Wouldn't this cause the locale for error strings to be fixated at the
time of the first strerror/gai_strerror call ?

Current code, despite it inefficiency, allow dynamic change of locale
that is reflected in strerror() output, I believe.

Received on Sat Jan 23 2010 - 18:38:40 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:00 UTC