[Nepomuk] Nepomuk KIO Slave

Sebastian Trüg trueg at kde.org
Thu Jul 15 14:19:21 CEST 2010


On 07/15/2010 01:26 PM, Vishesh Handa wrote:
> I've implemented the KIO slave to work with all the resources ( includes
> Contacts, Albums, etc )  I've done it in a generic manner, and we could
> even handle tags the same way. It works fine but I have a coupe of
> concerns -
>
> * If the Resource, say Contact, is used in some other place. For example
> a music album or whatever. The current approach would show the music
> album that as well. That is not what the user would want when they click
> on the contact name next to "Performer: " in the information panel. It
> would be better to somehow associate it with the property as well. That
> way if It would only returns the resources whose nmm:performer is that
> Contact.

One solution would be to do the forwarding in dolphin instead of the kio
slave and use a FileQuery.

> * This totally obliterates the need for the extremely handy
> ResourcePageGenerator. Should we remove it?

No, IMHO it is rather handy and can still be used with the "noForward"
option.

> * I've explicitly set the limit to 1000 for now ( Just for testing ) By
> default it is 10, which doesn't seem right. When I choose a Contact I
> want to see all the files associated with it. Or at least enough to fill
> the page, and if I choose the scroll down they should automatically fill
> up. I'm not sure what to do about this.

Do not set the limit! This is done in the nepomuk configuration. Also
Dolphin will get a button to fetch more results. It is not there since I
did a lot of refactoring at Akademy.

> * It's damn slow. I can actually see the Resources being filled up! But
> then this has nothing to do with the Nepomuk KIO slave. Any idea what
> makes the Nepomuk search kio slave so slow? The same query runs in less
> than a second manually ( via nepomukcmd ). I've not looked into the code
> throughly, but I will. It's too slow for me.

KIO has quite some overhead. Also it does at least one additional query
for each result when loading the Nepomuk::Resource.
The reason why you can see the results being populated is that I changed
the kio slave from reporting results in blocks to one by one. IMHO this
is more convenient but that is easy to change (replace listEntries()
with listEntry( entry, false ) in searchfolder.cpp).

> * The title doesn't get set. 1 never works. 2 works sometimes. I'll test
> more, and find out the problem.

The refactoring mentioned above is not 100% done yet. that could be the
reason.

> * It's ugly and looks out of place! It there any chance of changing
> Dolphin's Information Panel to reflect the search. Like maybe if we're
> searching for an Album we show the album's cover instead of the Nepomuk
> icon, and maybe show the albums properties in the side panel. If it's
> possible, please direct me to the appropriate code base ( or file ) and
> I'll have a look at it.

What is ugly?
Once you want to show specific information maybe your generic approach
does not work anymore. If you want to set an icon we would have to
introduce a new query item "icon" which would then be used to set the
UDS_ICON of the folder. That should be simple.

Cheers,
Sebastian


More information about the Nepomuk mailing list