[tracker/miner-fs-refactor: 87/93] libtracker-miner: Avoid IRI queries on parents of config dirs
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/miner-fs-refactor: 87/93] libtracker-miner: Avoid IRI queries on parents of config dirs
- Date: Fri, 7 Oct 2011 11:24:38 +0000 (UTC)
commit 336f29843d8ad2969d71a155dc59eebc1b75620d
Author: Carlos Garnacho <carlos lanedo com>
Date: Thu Oct 6 16:50:35 2011 +0200
libtracker-miner: Avoid IRI queries on parents of config dirs
src/libtracker-miner/tracker-miner-fs.c | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-miner-fs.c b/src/libtracker-miner/tracker-miner-fs.c
index 2e96ccb..1fc5a15 100644
--- a/src/libtracker-miner/tracker-miner-fs.c
+++ b/src/libtracker-miner/tracker-miner-fs.c
@@ -1188,9 +1188,13 @@ item_add_or_update (TrackerMinerFS *fs,
file);
}
- parent = g_file_get_parent (file);
- parent_urn = tracker_file_notifier_get_file_iri (fs->priv->file_notifier, parent);
- g_object_unref (parent);
+ if (!tracker_indexing_tree_file_is_root (fs->priv->indexing_tree, file)) {
+ parent = g_file_get_parent (file);
+ parent_urn = tracker_file_notifier_get_file_iri (fs->priv->file_notifier, parent);
+ g_object_unref (parent);
+ } else {
+ parent_urn = NULL;
+ }
/* Create task and add it to the pool as a WAIT task (we need to extract
* the file metadata and such) */
@@ -2120,8 +2124,8 @@ item_queue_handlers_cb (gpointer user_data)
parent = g_file_get_parent (file);
if (!parent ||
- tracker_file_notifier_get_file_iri (fs->priv->file_notifier, parent) ||
- tracker_indexing_tree_file_is_root (fs->priv->indexing_tree, file)) {
+ tracker_indexing_tree_file_is_root (fs->priv->indexing_tree, file) ||
+ tracker_file_notifier_get_file_iri (fs->priv->file_notifier, parent)) {
keep_processing = item_add_or_update (fs, file, priority,
(queue == QUEUE_CREATED));
} else {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]