bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: .Po file question


From: Bruno Haible
Subject: Re: .Po file question
Date: Wed, 24 Jan 2007 00:15:15 +0100 (MET)
User-agent: KMail/1.5.4

Hello,

Jim Bergstrom asked:
> Is there a recommended maximum size
> for a .po file? I am experiencing (obviously) performance degredation
> due to, I believe, is an extremely large .po file (its about 7.6mb and
> has 40,000+ translation strings).  I am trying to justify the
> time/resource needed to break this file up into multiple .po files to
> reduce server load.  Is there somewhere I can find this information?

Concerning the tools: Most tools operate in a time that is linear in the
size of the PO file, therefore breaking it into pieces will not gain you
much. The exception is 'msgmerge', whose fuzzy matching can be quadratic in
time, worst-case. You can use "msgmerge --no-fuzzy-matching" to avoid
this performance problem.

Concerning the performance at runtime, i.e. when you use gettext():
If the PO file's encoding is different from the locale encoding at run time
(for example the PO file is in ISO-8859-1 and the locale is an UTF-8 locale),
then the PO file's contents will be converted in memory to the locale encoding.
_If_ this is the case for you, and _if_ the PO file covers many source code
parts of which few parts are actually be used/executed, it will be a win to
split the PO file. (Because then only those messages of the PO files for the
code that is actually used will be converted.) Otherwise, it will not be a win,
because accessing 1 file is faster than accessing 20 files.

Other than that, I'm not aware of performance problems. But you can try to
show "gprof" profiler outputs that prove the contrary...

Bruno





reply via email to

[Prev in Thread] Current Thread [Next in Thread]