← Back to team overview

ubuntu-phone team mailing list archive

Re: Desktop file parsing - lets standardize

 

On Tue, 2013-11-12 at 14:56 +0000, Gerry Boland wrote:

> The cache is generated by the tool that can be found at [5].
> 
> The main point of the cache is answering complex questions like "give me
> the apps associated with application/pdf", though it will also probably
> speed up single .desktop-file key-value data reads since the cache will
> most probably be kept in memory or disk cache.


I don't think that the cache is really useful for our use-cases.  If we
do want a cache, I think it'd be better to add a Click desktop hook and
cache what is specifically needed for that case.  For instance, the
shell needs an icon and name cache, it doesn't need the other data.
Same for scopes, the exec line is mostly useless, but breaking down the
fields into the indexer at install time would save time when searching.


> What do people think? Are there alternatives I'm missing?


It seems to me the most difficult thing here is parsing of the ini-ish
file format, not creating a higher level abstraction of the keys.  Which
most of the libraries you mentioned are trying to do.  I see benefit in
having one parser of the file format, but the rest seems mostly icing
and is always going to be task specific.

In that vein, I'd be curious if we couldn't back one of the Qt libs onto
GKeyFile so we'd always read the files the same (quoting rules, etc.)
and then have the higher level abstraction be done in Qt/GIO/whatever
for those who needed those.

Ted

Attachment: signature.asc
Description: This is a digitally signed message part


References