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

Re: [virt-tools-list] [libosinfo 5/5] Load localized values for entity params

On Wed, Oct 24, 2012 at 09:07:22PM +0300, Zeeshan Ali (Khattak) wrote:
> However that would involve doing one extra string
> allocation/duplication for each untranslated node here. I really would
> want to avoid doing a lot of redundant computation/allocation for a
> something that may never happen.
> If the code could be written some other way that doesn't involve
> string allocations, I'm all ears.

Just compute the substituted language list once at runtime. But it's
probably not worth fighting with that.

> However, I recalled a few hour ago that we have the plan to setup a
> centralized database[1] and having translations in the xml itself will be
> very much desirable for that.

After a bit more homework, GConf schemas used to do that, but it had a
measurable impact on login time since all translations had to always be
parsed even though the user only needed a few. However, if this ever came
to be an issue for us, we still have the option of doing the same as what
GConf did, ie split the XML file in one XML file per translation. Hopefully
the files will be small enough that this won't be needed ;)


Attachment: pgpiTVG25qW5G.pgp
Description: PGP signature

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