tracker r2595 - in trunk: . src/libinotify src/trackerd



Author: mr
Date: Thu Nov 27 13:58:49 2008
New Revision: 2595
URL: http://svn.gnome.org/viewvc/tracker?rev=2595&view=rev

Log:
	* src/libinotify/inotify-handle.c: Disable warning causing breaks
	in gdb, it makes no difference either way.

	* src/trackerd/tracker-monitor.c: Don't call g_hash_table_remove
	(key) when we can use g_hash_table_iter_remove() instead. Also,
	don't reset the iter making us go round every item again after
	removing one. This seriously impedes performance. The removal
	wasn't actually working either. Meaning trackerd was using 100%
	CPU power in a continous while loop.


Modified:
   trunk/ChangeLog
   trunk/src/libinotify/inotify-handle.c
   trunk/src/trackerd/tracker-monitor.c

Modified: trunk/src/libinotify/inotify-handle.c
==============================================================================
--- trunk/src/libinotify/inotify-handle.c	(original)
+++ trunk/src/libinotify/inotify-handle.c	Thu Nov 27 13:58:49 2008
@@ -253,8 +253,8 @@
       return type;
 
     default:
-      if( state != inh_state_created )
-	inotify_warn( "Received direct event on non-created inh" );
+      /* if( state != inh_state_created ) */
+      /*   inotify_warn( "Received direct event on non-created inh" ); */
 
       inotify_debug( "	event is other type.  passing through" );
 

Modified: trunk/src/trackerd/tracker-monitor.c
==============================================================================
--- trunk/src/trackerd/tracker-monitor.c	(original)
+++ trunk/src/trackerd/tracker-monitor.c	Thu Nov 27 13:58:49 2008
@@ -723,10 +723,7 @@
 		}
 
 		/* Remove from hash tables (i.e. white list it) */
-		g_hash_table_remove (monitor->private->black_list, key);
-
-		/* Reset iterators */
-		g_hash_table_iter_init (&iter, monitor->private->black_list);
+		g_hash_table_iter_remove (&iter);
 	}
 
 	/* If the hash tables are empty, don't keep calling this
@@ -1036,10 +1033,7 @@
 		}
 
 		/* Clean up */
-		g_hash_table_remove (monitor->private->event_pairs, key);
-
-		/* Reset the iter, so we start from the top */
-		g_hash_table_iter_init (&iter, monitor->private->event_pairs);
+		g_hash_table_iter_remove (&iter);
 	}
 
 	if (g_hash_table_size (monitor->private->event_pairs) < 1) {
@@ -1141,10 +1135,7 @@
 		}
 
 		/* Clean up */
-		g_hash_table_remove (monitor->private->cached_events, key);
-
-		/* Reset the iter, so we start from the top */
-		g_hash_table_iter_init (&iter, monitor->private->cached_events);
+		g_hash_table_iter_remove (&iter);
 	}
 
 	if (g_hash_table_size (monitor->private->cached_events) < 1) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]