I want to clear up the reason why I am hesitating a bit to jump right
into this. Not saying we shouldn't fix it, definitely we should! Just
that I am hesitating, to contemplate it a bit.

The XDG desktop file spec (or is it the menu spec?) dictates that to
compute the desktop file id of something nested in the applications dir
you substitute all slashes "/" for dashes "-". So fx.
~/.local/share/applications/wine/Programs/Songbird/Songbird.desktop has
desktop file id wine-Programs-Songbird-Songbird.desktop. So when we look
it up by id we need to check 8 permutations of / and - (in the worst
case). That is 8 stat()s instead of 1.

The big problem is that in order to be 100% consistent we must support
this on *all* .desktop files with - in the basename, not just wine
files. I quick series of shell commands show that I have 727 -s in
desktop file names in /usr/share/applications and /usr/share/app-
install/desktop in total. The number of needed (worst case) permutations
is prolly a bit bigger becomes some files have more than one - in the
name; so roughly maybe around 1000k extra stat() calls.

Needless to say; we can apply a lot of tricks to get *well* below the
worst case number of 1k extra stat()s; but it goes to show that the XDG
spec is particularly bad at this point, and it's not something we should
just dive into head first. It may give a non-trivial impact on startup
performance.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/635223

Title:
  Wine applications not listed in Unity Applications Place

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to