List Info

Thread: Performance with GNU Gettext?




Performance with GNU Gettext?
user name
2006-03-27 17:55:54
Hi All,

How does the performance using GNU Gettext? 

Is gettext nice and fast?  

Application startup time is something we're quite concerned
about, and
trying to be very careful with.  Translations with gettext
is overhead
on top of using a .glade file.  There may be many
translations when an
application starts up (all the menuitems, for example). 

What does that involve?

Thanks.


Sophia Chang
sophia.changpalmsource.com

_______________________________________________
gtk-i18n-list mailing list
gtk-i18n-listgnome.org

http://mail.gnome.org/mailman/listinfo/gtk-i18n-list
Performance with GNU Gettext?
user name
2006-03-27 17:59:17
On Mon, 27 Mar 2006, Sophia Chang wrote:

> Hi All,
>
> How does the performance using GNU Gettext?
>
> Is gettext nice and fast?
>
> Application startup time is something we're quite
concerned about, and
> trying to be very careful with.  Translations with
gettext is overhead
> on top of using a .glade file.  There may be many
translations when an
> application starts up (all the menuitems, for example).
>
> What does that involve?

Hi Sophia,

No single profiling data has ever shown anything gettext or
locale related out of glib taking anything like significant
time
(say 1%).  So, I won't bother with them.  The way gettext
is
implemented is that it keeps the messages in a binary hash
table
on the disk (the .mo file) and looks up messages in it, so
as far
as I know, there's not much initialization overhead
involved.


> Thanks.
>
>
> Sophia Chang
> sophia.changpalmsource.com

--behdad
http://behdad.org/

"Commandment Three says Do Not Kill, Amendment Two
says Blood Will Spill"
	-- Dan Bern, "New American Language"
_______________________________________________
gtk-i18n-list mailing list
gtk-i18n-listgnome.org

http://mail.gnome.org/mailman/listinfo/gtk-i18n-list
Performance with GNU Gettext?
user name
2006-03-27 20:33:41
Sophia,

Today at 19:59, Behdad Esfahbod wrote:

> No single profiling data has ever shown anything
gettext or
> locale related out of glib taking anything like
significant time
> (say 1%).  So, I won't bother with them.  The way
gettext is
> implemented is that it keeps the messages in a binary
hash table
> on the disk (the .mo file) and looks up messages in it,
so as far
> as I know, there's not much initialization overhead
involved.

Also note that it's commonly memory mapped (I think: it's
been a while
since I looked at that), so it's even faster than that. 
It's also
pretty conservative in what files it loads (it was my
impression that
Sophia expects it to load all translations, while it loads
only one
that is actually needed).

Anyway, for anyone using Glade (think XML parsing), GNU
gettext should
not be a performance issue at all. 

Cheers,
Danilo
_______________________________________________
gtk-i18n-list mailing list
gtk-i18n-listgnome.org

http://mail.gnome.org/mailman/listinfo/gtk-i18n-list
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )