Language packs and desktop entries

Takao Fujiwara - Tokyo S/W Center Takao.Fujiwara at Sun.COM
Wed Jun 8 10:21:23 EEST 2005

Alexander Larsson wrote:
> On Wed, 2005-06-08 at 15:33 +0900, Takao Fujiwara - Tokyo S/W Center
> wrote:
>>Excellent summary. Thanks for the valuable discussions.
>>Mark McLoughlin wrote:
>>>	To summarise the discussion we had at GUADEC around this issue, we
>>>talked about two solutions.
>>>  1) Put the translation domain for the app in the .desktop file and
>>>     have .desktop file parsers pull the translations from the 
>>>     approriate message catalog.
>>>     This is nice from the point of view that it would solve the 
>>>     language packs issue very cleanly and that (at least in GNOME) the 
>>>     translations are already in the message catalog.
>>>     First problem is the performace hit with having to read every app's
>>>     message catalog. We're already seeing problems because of the 
>>>     amount of disk seeking involved with loading every .desktop file. 
>>>     Add message catalogs into the equation and you now have to locate 
>>>     each message catalog (by stat()ing for each locale alias) and 
>>>     load it.
>>Yes, this is right. But .mo is a binary and .destop is a text file. So for the milestone, If we change almost .desktop files to .mo files, I think the
>>performance will be faster rather than the current implementations. One solution is to use one .mo file for the .desktop file.
> I think you are misunderstanding what the performance problem is. The
> problem is the need to open multiple files (both desktop and mo), and
> for .mo file its even worse, as it requires multiple stats to locate the
> right translation. Each stat of a file means a seek, and two seeks for
> an open. Each seek is on average half a rotational delay on the HD,
> which is a very long time in cpu clock cycles. Actually reading the file
> once we've seeked to it is not a problem, relatively.
> In fact, the stating and opening of many files in for instance the icon
> theme spec has caused massive performance issues for implementations,
> and we do *not* want that to happen again.

OK, you mean even if we use one .mo file only, the multiple stats effect the performance?
My understanding is to read one by one .icon file.

If possible, could you provide the measurable way?
I have a sample implementation and I don't find the big delay on Ultra 10. so If I could show the exact time, it would be a really help for one
reference. I think the concern needs to be investigated.


> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>  Alexander Larsson                                            Red Hat, Inc 
>                    alexl at    alla at 
> He's a superhumanly strong Jewish dwarf with no name. She's a provocative 
> mutant mermaid with her own daytime radio talk show. They fight crime! 
> _______________________________________________
> xdg mailing list
> xdg at

More information about the xdg mailing list