summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2017-10-18 23:15:12 +0200
committerCarlos Garnacho <carlosg@gnome.org>2017-11-14 22:45:26 +0100
commit671a599f92cdb9e70205db3182c3944f30ca2cb8 (patch)
treeb390de77a81d1c0ad4e1ead1dd4f81ab65d0f4f4
parent472215a31e2b7bfcc4320c55657330ad81178f6e (diff)
downloadtracker-671a599f92cdb9e70205db3182c3944f30ca2cb8.tar.gz
libtracker-miner: Remove dead TrackerMonitor code
The PAUSE_ON_IO feature required someone to notice it and modify tracker code to #define instead of #undef. I discovered it before, and chose to remove it instead.
-rw-r--r--src/libtracker-miner/tracker-monitor.c59
1 files changed, 0 insertions, 59 deletions
diff --git a/src/libtracker-miner/tracker-monitor.c b/src/libtracker-miner/tracker-monitor.c
index 29f6984fe..a467f1a51 100644
--- a/src/libtracker-miner/tracker-monitor.c
+++ b/src/libtracker-miner/tracker-monitor.c
@@ -52,17 +52,6 @@
/* The life time of an item in the cache */
#define CACHE_LIFETIME_SECONDS 1
-/* When we receive IO monitor events, we pause sending information to
- * the indexer for a few seconds before continuing. We have to receive
- * NO events for at least a few seconds before unpausing.
- */
-#define PAUSE_ON_IO_SECONDS 5
-
-/* If this is defined, we pause the indexer when we get events. If it
- * is not, we don't do any pausing.
- */
-#undef PAUSE_ON_IO
-
struct TrackerMonitorPrivate {
GHashTable *monitors;
@@ -79,11 +68,6 @@ struct TrackerMonitorPrivate {
*/
gboolean use_changed_event;
-#ifdef PAUSE_ON_IO
- /* Timeout id for pausing when we get IO */
- guint unpause_timeout_id;
-#endif /* PAUSE_ON_IO */
-
GHashTable *pre_update;
GHashTable *pre_delete;
guint event_pairs_timeout_id;
@@ -360,12 +344,6 @@ tracker_monitor_finalize (GObject *object)
priv = TRACKER_MONITOR_GET_PRIVATE (object);
-#ifdef PAUSE_ON_IO
- if (priv->unpause_timeout_id) {
- g_source_remove (priv->unpause_timeout_id);
- }
-#endif /* PAUSE_ON_IO */
-
if (priv->event_pairs_timeout_id) {
g_source_remove (priv->event_pairs_timeout_id);
}
@@ -463,27 +441,6 @@ get_inotify_limit (void)
return limit;
}
-#ifdef PAUSE_ON_IO
-
-static gboolean
-unpause_cb (gpointer data)
-{
- TrackerMonitor *monitor;
-
- monitor = data;
-
- g_message ("Resuming indexing now we have stopped "
- "receiving monitor events for %d seconds",
- PAUSE_ON_IO_SECONDS);
-
- monitor->priv->unpause_timeout_id = 0;
- tracker_status_set_is_paused_for_io (FALSE);
-
- return FALSE;
-}
-
-#endif /* PAUSE_ON_IO */
-
static gboolean
check_is_directory (TrackerMonitor *monitor,
GFile *file)
@@ -1298,22 +1255,6 @@ monitor_event_cb (GFileMonitor *file_monitor,
other_file_uri);
}
-#ifdef PAUSE_ON_IO
- if (monitor->priv->unpause_timeout_id != 0) {
- g_source_remove (monitor->priv->unpause_timeout_id);
- } else {
- g_message ("Pausing indexing because we are "
- "receiving monitor events");
-
- tracker_status_set_is_paused_for_io (TRUE);
- }
-
- monitor->priv->unpause_timeout_id =
- g_timeout_add_seconds (PAUSE_ON_IO_SECONDS,
- unpause_cb,
- monitor);
-#endif /* PAUSE_ON_IO */
-
if (!is_directory) {
/* FILE Events */
switch (event_type) {