tracker: Don't search the item if it's not yours
authorZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Thu, 12 Nov 2009 13:44:40 +0000 (15:44 +0200)
committerZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Mon, 16 Nov 2009 14:22:55 +0000 (16:22 +0200)
SearchContainer shouldn't bother to search the item if it's not
it's own. This optimizes item search quite a bit as we save a lot
of dbus method calls.

src/plugins/tracker/rygel-tracker-search-container.vala

index e5a2831..be7cff3 100644 (file)
@@ -213,7 +213,7 @@ public class Rygel.TrackerSearchContainer : Rygel.MediaContainer {
                 var path = this.get_item_info (rel_expression.operand2,
                                                out parent_id,
                                                out service);
-                if (path != null) {
+                if (path != null && parent_id != null && parent_id == this.id) {
                     var dir = Path.get_dirname (path);
                     var basename = Path.get_basename (path);