[haiku-development] Re: Localization of file names?

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sun, 28 Feb 2010 23:48:57 +0100

On 2010-02-28 at 22:11:14 [+0100], Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> 
wrote:
> Ingo Weinhold <ingo_weinhold@xxxxxx> wrote:
> > That would make it kind of hard to add a translation afterwards. In
> > the cases
> > where file name translation makes sense at all (that wouldn't apply
> > to
> > add-ons) I would rather add one or two attributes to identify a
> > catalog and a
> > translation key, so that the translated name could be looked up from
> > the
> > respective catalog.
> 
> Also don't forget that it would be rather expensive to have an extra
> attribute lookup per file (thinking about folders with several thousand
> files).
>
> So maybe one should either have well known entries/locations that are
> to be translated, or, alternatively, have one could add a marker
> attribute to the parent directory, so that Tracker knows when to look
> for that extra attribute.

A simple attribute lookups shouldn't be *that* expensive either. It would 
basically be one additional syscall per file and the concerned block would 
very likely be already cached, since Tracker reads a lot more info for the 
files anyway. Unless those thousands of file names actually need to be 
translated, the additional overhead is probably not even measurable. 
Doesn't harm to actually test this, though.

CU, Ingo

Other related posts: