[tracker/miner-fs-queries-performance: 2/6] TrackerMinerFS: Do not query parent URN frequently if it doesn't exist.
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/miner-fs-queries-performance: 2/6] TrackerMinerFS: Do not query parent URN frequently if it doesn't exist.
- Date: Thu, 22 Apr 2010 08:53:07 +0000 (UTC)
commit a987c47795a52be5c44d0f260b22c1e32f4b7940
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Apr 21 14:02:30 2010 +0200
TrackerMinerFS: Do not query parent URN frequently if it doesn't exist.
This is specially visible in the applications miner, since the container
directories aren't actually stored.
src/libtracker-miner/tracker-miner-fs.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-miner-fs.c b/src/libtracker-miner/tracker-miner-fs.c
index c4d02b5..17e7f18 100644
--- a/src/libtracker-miner/tracker-miner-fs.c
+++ b/src/libtracker-miner/tracker-miner-fs.c
@@ -1238,10 +1238,9 @@ item_add_or_update (TrackerMinerFS *fs,
g_free (fs->private->current_parent_urn);
- if (item_query_exists (fs, parent, &fs->private->current_parent_urn, NULL))
- fs->private->current_parent = g_object_ref (parent);
- else {
- fs->private->current_parent = NULL;
+ fs->private->current_parent = g_object_ref (parent);
+
+ if (!item_query_exists (fs, parent, &fs->private->current_parent_urn, NULL)) {
fs->private->current_parent_urn = NULL;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]