tracker r3004 - in trunk: . src/libtracker-db



Author: mr
Date: Tue Mar  3 13:48:44 2009
New Revision: 3004
URL: http://svn.gnome.org/viewvc/tracker?rev=3004&view=rev

Log:
	* src/libtracker-db/tracker-db-manager.c: Removed
	TRACKER_DB_PAGE_SIZE_DEFAULT, use TRACKER_DB_PAGE_SIZE_DONT_SET
	instead because this allows SQLite to decide what to use based on
	the file system block size. Tests with 40k items show a 2 minute
	speed improvement (was 13.5 minutes in total).


Modified:
   trunk/ChangeLog
   trunk/src/libtracker-db/tracker-db-manager.c

Modified: trunk/src/libtracker-db/tracker-db-manager.c
==============================================================================
--- trunk/src/libtracker-db/tracker-db-manager.c	(original)
+++ trunk/src/libtracker-db/tracker-db-manager.c	Tue Mar  3 13:48:44 2009
@@ -42,7 +42,6 @@
 #define ZLIB_BUF_SIZE		      8192
 
 /* Default memory settings for databases */
-#define TRACKER_DB_PAGE_SIZE_DEFAULT  4096
 #define TRACKER_DB_PAGE_SIZE_DONT_SET -1
 
 /* Size is in bytes and is currently 2Gb */
@@ -93,7 +92,7 @@
 	  NULL,
 	  NULL,
 	  32,
-	  TRACKER_DB_PAGE_SIZE_DEFAULT,
+	  TRACKER_DB_PAGE_SIZE_DONT_SET,
 	  FALSE,
 	  FALSE,
 	  FALSE,
@@ -105,7 +104,7 @@
 	  "common",
 	  NULL,
 	  32,
-	  TRACKER_DB_PAGE_SIZE_DEFAULT,
+	  TRACKER_DB_PAGE_SIZE_DONT_SET,
 	  FALSE,
 	  FALSE,
 	  FALSE,
@@ -129,7 +128,7 @@
 	  "file-meta",
 	  NULL,
 	  512,
-	  TRACKER_DB_PAGE_SIZE_DEFAULT,
+	  TRACKER_DB_PAGE_SIZE_DONT_SET,
 	  TRUE,
 	  FALSE,
 	  FALSE,
@@ -141,7 +140,7 @@
 	  "file-fulltext",
 	  NULL,
 	  512,
-	  TRACKER_DB_PAGE_SIZE_DEFAULT,
+	  TRACKER_DB_PAGE_SIZE_DONT_SET,
 	  TRUE,
 	  FALSE,
 	  TRUE,
@@ -153,7 +152,7 @@
 	  "file-contents",
 	  NULL,
 	  1024,
-	  TRACKER_DB_PAGE_SIZE_DEFAULT,
+	  TRACKER_DB_PAGE_SIZE_DONT_SET,
 	  FALSE,
 	  FALSE,
 	  FALSE,
@@ -165,7 +164,7 @@
 	  "email-meta",
 	  NULL,
 	  512,
-	  TRACKER_DB_PAGE_SIZE_DEFAULT,
+	  TRACKER_DB_PAGE_SIZE_DONT_SET,
 	  TRUE,
 	  FALSE,
  	  0 },
@@ -176,7 +175,7 @@
 	  "email-fulltext",
 	  NULL,
 	  512,
-	  TRACKER_DB_PAGE_SIZE_DEFAULT,
+	  TRACKER_DB_PAGE_SIZE_DONT_SET,
 	  TRUE,
 	  FALSE,
 	  TRUE,
@@ -188,7 +187,7 @@
 	  "email-contents",
 	  NULL,
 	  512,
-	  TRACKER_DB_PAGE_SIZE_DEFAULT,
+	  TRACKER_DB_PAGE_SIZE_DONT_SET,
 	  FALSE,
 	  FALSE,
 	  FALSE,
@@ -200,7 +199,7 @@
 	  "xesam",
 	  NULL,
 	  512,
-	  TRACKER_DB_PAGE_SIZE_DEFAULT,
+	  TRACKER_DB_PAGE_SIZE_DONT_SET,
 	  TRUE,
 	  FALSE,
 	  FALSE,
@@ -1337,9 +1336,11 @@
 			    gint		argc,
 			    GValue		values[])
 {
-	AggregateData *p = (AggregateData *)aggregate_context;
-	
-	g_assert (argc==1);
+	AggregateData *p;
+
+	g_return_if_fail (argc != 1);
+
+	p = aggregate_context;
 
 	if (!p->string) {
 		p->string = g_string_new ("");
@@ -1357,7 +1358,9 @@
 			     void               *aggregate_context)
 {
 	GValue result = { 0, };
-	AggregateData *p = (AggregateData *)aggregate_context;
+	AggregateData *p;
+
+	p = aggregate_context;
 
 	g_value_init (&result, G_TYPE_STRING);
 	g_value_set_string (&result, p->string->str);
@@ -1373,8 +1376,8 @@
 			   gint		       argc,
 			   GValue	       values[])
 {
-	GValue	result = { 0, };
-	const gchar  *str;
+	GValue result = { 0, };
+	const gchar *str;
 
 	str = tracker_ontology_get_service_by_id (g_value_get_int (&values[0]));
 	g_value_init (&result, G_TYPE_STRING);



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