[tracker-miners/wip/carlosg/speed-track: 1/22] libtracker-miner: Avoid doubly processing directories
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners/wip/carlosg/speed-track: 1/22] libtracker-miner: Avoid doubly processing directories
- Date: Thu, 22 Oct 2020 14:45:55 +0000 (UTC)
commit 233e5e61bc576167b2f556dfce3f7b104380262e
Author: Carlos Garnacho <carlosg gnome org>
Date: Sat Oct 17 15:55:24 2020 +0200
libtracker-miner: Avoid doubly processing directories
Directories in recursively indexed roots are doubly checked here,
once when processing the parent directory children, and another
when processing the directory and its children.
Avoid the latter, so we only go through these bits once.
src/libtracker-miner/tracker-file-notifier.c | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/src/libtracker-miner/tracker-file-notifier.c b/src/libtracker-miner/tracker-file-notifier.c
index 65305cd07..e66d3184c 100644
--- a/src/libtracker-miner/tracker-file-notifier.c
+++ b/src/libtracker-miner/tracker-file-notifier.c
@@ -382,6 +382,11 @@ file_notifier_add_node_foreach (GNode *node,
priv = tracker_file_notifier_get_instance_private (data->notifier);
file = node->data;
+ if (G_NODE_IS_ROOT (node) &&
+ (file != priv->current_index_root->root ||
+ priv->current_index_root->ignore_root))
+ return FALSE;
+
if (node->parent &&
node->parent != data->cur_parent_node) {
data->cur_parent_node = node->parent;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]