[Nepomuk] On limits of terms for a facet

Alessandro Sivieri alessandro.sivieri at gmail.com
Mon Mar 8 19:26:18 CET 2010


Ok, now puntual comments:

2010/3/8 Sebastian Trueg <trueg at kde.org>

> 1. In TagsFacet::queryNextResult
>
> term.addSubTerm(Query::ComparisonTerm(Soprano::Vocabulary::NAO::hasTag(),
> Query::LiteralTerm(label)))
>
> should be
>
> term.addSubTerm(Query::ComparisonTerm(Soprano::Vocabulary::NAO::hasTag(),
> Query::ResourceTerm(query->binding(0).uri())))
>
> This will prevent the query from using a string matching. This should
> speed up the query significantly (BTW: I suppose this is why the UI is
> blocking).
>
>
Indeed, it was this that was blocking the UI: thanks!


> 2. Restricting by folder (as you do by default using a FILTER) slows
> down the query A LOT.
>
>
Well, somewhere I need to restrict tags and their count to the current
folder: if the user changes it through the normal browsing, then the tags
and also the tag counters need to be restricted to that folder.
For now I'm doing this directly in the main query, the one getting the list
of tags; the only alternative that I see here is to get the list of tags
directly (not through the tagged file list), and then restrict by folder
when asking for the count of each tag; this may speed up things, the only
drawback is that it will get _all_ the tags in the first place, so that the
pruning of the tag list will be done through the model (which drops tags
with zero as counter) instead of through the query itself... in a standard
db this would be ugly, but maybe in our case it is better, given the fact
that sparql is way much slower than sql.


> 3. It probably is not necessary to re-query the tags each time the
> factes change. Although I am also not sure if it would change much.
>
>
Yes, but at least I need to update the counters.


> 4. OpenLink is currently accessing the perfect indexing scheme for us.
> This in combination with proper inferencing should give us another
> performance boost.
>

Nice to hear that!

-- 
Sivieri Alessandro
alessandro.sivieri at gmail.com
http://www.chimera-bellerofonte.eu/
http://www.poul.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/nepomuk/attachments/20100308/c5d6fa33/attachment.htm 


More information about the Nepomuk mailing list