tracker r2214 - in branches/indexer-split: . src/libtracker-db src/tracker-indexer



Author: mr
Date: Thu Sep 11 11:19:51 2008
New Revision: 2214
URL: http://svn.gnome.org/viewvc/tracker?rev=2214&view=rev

Log:
	* src/tracker-indexer/tracker-indexer.c: (process_file): Add some
	compiler hints to optimize the code here a little.

	* src/tracker-indexer/tracker-metadata-utils.c:
	(tracker_metadata_utils_get_text),
	(tracker_metadata_utils_get_thumbnail): Disable thumbnail
	retrieval until it is faster.


Modified:
   branches/indexer-split/ChangeLog
   branches/indexer-split/src/libtracker-db/tracker-db-index.c
   branches/indexer-split/src/tracker-indexer/tracker-indexer.c
   branches/indexer-split/src/tracker-indexer/tracker-metadata-utils.c

Modified: branches/indexer-split/src/libtracker-db/tracker-db-index.c
==============================================================================
--- branches/indexer-split/src/libtracker-db/tracker-db-index.c	(original)
+++ branches/indexer-split/src/libtracker-db/tracker-db-index.c	Thu Sep 11 11:19:51 2008
@@ -697,8 +697,8 @@
 
 static gboolean
 cache_flush_item (gpointer key,
-		     gpointer value,
-		     gpointer user_data)
+		  gpointer value,
+		  gpointer user_data)
 {
 	GArray *array;
 	DEPOT  *index;

Modified: branches/indexer-split/src/tracker-indexer/tracker-indexer.c
==============================================================================
--- branches/indexer-split/src/tracker-indexer/tracker-indexer.c	(original)
+++ branches/indexer-split/src/tracker-indexer/tracker-indexer.c	Thu Sep 11 11:19:51 2008
@@ -1890,7 +1890,6 @@
 	
 	return TRUE;
 }
-
 static gboolean
 process_file (TrackerIndexer *indexer,
 	      PathInfo       *info)
@@ -1915,7 +1914,7 @@
 	}
 		
 	/* For normal files, we do some checks, for moves we don't need these */
-	if (!info->other_file) {
+	if (G_LIKELY (!info->other_file)) {
 		if (!should_index_file (indexer, info, dirname, basename)) {
 			g_debug ("File is already up to date: '%s'", info->file->path);
 

Modified: branches/indexer-split/src/tracker-indexer/tracker-metadata-utils.c
==============================================================================
--- branches/indexer-split/src/tracker-indexer/tracker-metadata-utils.c	(original)
+++ branches/indexer-split/src/tracker-indexer/tracker-metadata-utils.c	Thu Sep 11 11:19:51 2008
@@ -19,17 +19,24 @@
  * Boston, MA  02110-1301, USA.
  */
 
+#include <gio/gio.h>
+
 #include <libtracker-common/tracker-file-utils.h>
 #include <libtracker-common/tracker-type-utils.h>
 #include <libtracker-common/tracker-os-dependant.h>
 #include <libtracker-common/tracker-ontology.h>
-#include <gio/gio.h>
+
 #include <string.h>
 
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
 
+/* This is temporarily disabled until hildon-thumbnailer is enabled.
+ * There are performance concerns with this enabled.
+ */
+#undef THUMBNAIL_RETRIEVAL_ENABLED
+
 #ifdef HAVE_HILDON_THUMBNAIL
 #include <hildon-thumbnail-factory.h>
 #endif
@@ -734,6 +741,7 @@
 tracker_metadata_utils_get_thumbnail (const gchar *path,
 				      const gchar *mime)
 {
+#ifdef THUMBNAIL_RETRIEVAL_ENABLED
 #ifdef HAVE_HILDON_THUMBNAIL
 	hildon_thumbnail_factory_load (path, mime, 128, 128, NULL, NULL);
 #else
@@ -779,7 +787,6 @@
 	g_debug ("Got thumbnail '%s' for '%s'", thumbnail->str, path);
 
 	g_string_free (thumbnail, TRUE);
-
-#endif
-
+#endif /* HAVE_HILDON_THUMBNAIL */
+#endif /* THUMBNIAL_RETRIEVAL_ENABLED */
 }



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