Re: Some g_get_language_names issues



On Mon, 2005-02-28 at 19:07 -0500, Ben Maurer wrote:
Hey guys,
>
>I was noticing that the g_get_language_names which is in bonobo takes
up
>alot of memory mclasen directed me to the fact that this function is in
>glib now. However, glib only supports LC_MESSAGES. libgnome and bonobo
>need support for any of the env variables here (bonobo only wants LANG
>and libgnome supports arbitrary input).

When g_get_language_names() was designed, we couldn't come up with
any use cases justifying the support for different categories.

>Another issue I noticed is that bonobo searches:
>        read_aliases (BONOBO_ACTIVATION_LOCALEDIR "/locale.alias");
>        read_aliases ("/usr/share/locale/locale.alias");
>        read_aliases ("/usr/local/share/locale/locale.alias");
>        read_aliases ("/usr/lib/X11/locale/locale.alias");
>        read_aliases ("/usr/openwin/lib/locale/locale.alias");
>
>Third, it would be nice to do a little cache in this function of `very
>common locales'. It seems somewhat bloated to load the alias files (the
>sum of the sizes of the above files is 80 kb on my box, malloc'ing over
>100 kb of ram to look at it) just to find out en_US.UTF-8 is not
aliased.

g_get_language_names() is a little saner here, it only reads
/usr/share/locale/locale.alias.

Matthias





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]