[Nepomuk] Optimizing the Removeable Media Model

Vishesh Handa me at vhanda.in
Tue Sep 18 14:07:46 UTC 2012

Hey everyone

If you're not Sebastian, then please read -

I've managed to clear some of the major bottle necks that were present in
the Nepomuk code. The only one that I'm left with is the
RemoveableMediaModel. It slows down all the queries by an order of 40%.
This is because it parses the entire query and tries to convert the file
urls into filex. This parsing is slow, and I don't think we can optimize it.

Even more importantly, it slows down addStatements, which is already very

I've been thinking on ways to optimize the entire model -

1. Only enable it when we have some removeable media plugged in. If we use
this approach we would obviously have to discard the entire option of
showing results which aren't there on the file system with the dialog
("Please mount ...").

2. We handle this on the client side. The "File" class can return the
modify the url before returning it to the user. This would require that
everyone use the File class when dealing with files, which makes the
concept of the DMS moot.

3. Any suggestions?

4. Go back to the old days where there was no Removeable Media Handling +
some hacks in the FileWatcher to not delete the metadata associated with
those files.

Vishesh Handa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/nepomuk/attachments/20120918/a825a9af/attachment.html>

More information about the Nepomuk mailing list