[tracker] Fixes GB#615184, Is the low memory configuration option deprecated?
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] Fixes GB#615184, Is the low memory configuration option deprecated?
- Date: Mon, 12 Apr 2010 17:13:22 +0000 (UTC)
commit 954120915f7a84bf4c0faa8af956e60c83549f0a
Author: Martyn Russell <martyn lanedo com>
Date: Mon Apr 12 18:13:14 2010 +0100
Fixes GB#615184, Is the low memory configuration option deprecated?
The LowMemoryMode has now been removed from tracker-store
The TRACKER_DB_MANAGER_LOW_MEMORY_MODE flag was also removed from
libtracker-db now that it is unused.
src/libtracker-db/tracker-db-manager.c | 8 ----
src/libtracker-db/tracker-db-manager.h | 2 +-
src/tracker-store/tracker-config.c | 56 +++----------------------------
src/tracker-store/tracker-config.h | 4 --
src/tracker-store/tracker-main.c | 15 --------
5 files changed, 7 insertions(+), 78 deletions(-)
---
diff --git a/src/libtracker-db/tracker-db-manager.c b/src/libtracker-db/tracker-db-manager.c
index b39efdb..13b3996 100644
--- a/src/libtracker-db/tracker-db-manager.c
+++ b/src/libtracker-db/tracker-db-manager.c
@@ -619,10 +619,6 @@ tracker_db_manager_init_locations (void)
for (i = 1; i < G_N_ELEMENTS (dbs); i++) {
dir = location_to_directory (dbs[i].location);
dbs[i].abs_filename = g_build_filename (dir, dbs[i].file, NULL);
-
- if (old_flags & TRACKER_DB_MANAGER_LOW_MEMORY_MODE) {
- dbs[i].cache_size /= 2;
- }
}
locations_initialized = TRUE;
@@ -732,10 +728,6 @@ tracker_db_manager_init (TrackerDBManagerFlags flags,
g_free (dbs[i].abs_filename);
dbs[i].abs_filename = g_build_filename (dir, dbs[i].file, NULL);
- if (flags & TRACKER_DB_MANAGER_LOW_MEMORY_MODE) {
- dbs[i].cache_size /= 2;
- }
-
/* Check we have each database in place, if one is
* missing, we reindex.
*/
diff --git a/src/libtracker-db/tracker-db-manager.h b/src/libtracker-db/tracker-db-manager.h
index 34375d4..520daba 100644
--- a/src/libtracker-db/tracker-db-manager.h
+++ b/src/libtracker-db/tracker-db-manager.h
@@ -42,7 +42,7 @@ typedef enum {
typedef enum {
TRACKER_DB_MANAGER_FORCE_REINDEX = 1 << 1,
TRACKER_DB_MANAGER_REMOVE_CACHE = 1 << 2,
- TRACKER_DB_MANAGER_LOW_MEMORY_MODE = 1 << 3,
+ /* 1 << 3 Was low mem mode */
TRACKER_DB_MANAGER_REMOVE_ALL = 1 << 4,
TRACKER_DB_MANAGER_READONLY = 1 << 5
} TrackerDBManagerFlags;
diff --git a/src/tracker-store/tracker-config.c b/src/tracker-store/tracker-config.c
index ce50b6e..f18b15e 100644
--- a/src/tracker-store/tracker-config.c
+++ b/src/tracker-store/tracker-config.c
@@ -32,23 +32,21 @@
#define TRACKER_CONFIG_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TRACKER_TYPE_CONFIG, TrackerConfigPrivate))
/* GKeyFile defines */
-#define GROUP_GENERAL "General"
-#define GROUP_INDEXING "Indexing"
+#define GROUP_GENERAL "General"
+#define GROUP_INDEXING "Indexing"
/* Default values */
-#define DEFAULT_VERBOSITY 2
-#define DEFAULT_LOW_MEMORY_MODE FALSE
+#define DEFAULT_VERBOSITY 2
/* typedef struct TrackerConfigPrivate TrackerConfigPrivate; */
typedef struct {
/* General */
- gint verbosity;
- gboolean low_memory_mode;
+ gint verbosity;
} TrackerConfigPrivate;
typedef struct {
- GType type;
+ GType type;
const gchar *property;
const gchar *group;
const gchar *key;
@@ -73,13 +71,11 @@ enum {
PROP_0,
/* General */
- PROP_VERBOSITY,
- PROP_LOW_MEMORY_MODE,
+ PROP_VERBOSITY
};
static ObjectToKeyFile conversions[] = {
{ G_TYPE_INT, "verbosity", GROUP_GENERAL, "Verbosity" },
- { G_TYPE_BOOLEAN, "low-memory-mode", GROUP_GENERAL, "LowMemoryMode" },
};
G_DEFINE_TYPE (TrackerConfig, tracker_config, TRACKER_TYPE_CONFIG_FILE);
@@ -104,13 +100,6 @@ tracker_config_class_init (TrackerConfigClass *klass)
3,
DEFAULT_VERBOSITY,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
- g_object_class_install_property (object_class,
- PROP_LOW_MEMORY_MODE,
- g_param_spec_boolean ("low-memory-mode",
- "Use extra memory",
- " Minimizes memory use at the expense of indexing speed",
- DEFAULT_LOW_MEMORY_MODE,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
g_type_class_add_private (object_class, sizeof (TrackerConfigPrivate));
}
@@ -132,10 +121,6 @@ config_set_property (GObject *object,
tracker_config_set_verbosity (TRACKER_CONFIG (object),
g_value_get_int (value));
break;
- case PROP_LOW_MEMORY_MODE:
- tracker_config_set_low_memory_mode (TRACKER_CONFIG (object),
- g_value_get_boolean (value));
- break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
@@ -158,9 +143,6 @@ config_get_property (GObject *object,
case PROP_VERBOSITY:
g_value_set_int (value, priv->verbosity);
break;
- case PROP_LOW_MEMORY_MODE:
- g_value_set_boolean (value, priv->low_memory_mode);
- break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
@@ -351,18 +333,6 @@ tracker_config_get_verbosity (TrackerConfig *config)
return priv->verbosity;
}
-gboolean
-tracker_config_get_low_memory_mode (TrackerConfig *config)
-{
- TrackerConfigPrivate *priv;
-
- g_return_val_if_fail (TRACKER_IS_CONFIG (config), DEFAULT_LOW_MEMORY_MODE);
-
- priv = TRACKER_CONFIG_GET_PRIVATE (config);
-
- return priv->low_memory_mode;
-}
-
void
tracker_config_set_verbosity (TrackerConfig *config,
gint value)
@@ -380,17 +350,3 @@ tracker_config_set_verbosity (TrackerConfig *config,
priv->verbosity = value;
g_object_notify (G_OBJECT (config), "verbosity");
}
-
-void
-tracker_config_set_low_memory_mode (TrackerConfig *config,
- gboolean value)
-{
- TrackerConfigPrivate *priv;
-
- g_return_if_fail (TRACKER_IS_CONFIG (config));
-
- priv = TRACKER_CONFIG_GET_PRIVATE (config);
-
- priv->low_memory_mode = value;
- g_object_notify (G_OBJECT (config), "low-memory-mode");
-}
diff --git a/src/tracker-store/tracker-config.h b/src/tracker-store/tracker-config.h
index 3935461..beb85f3 100644
--- a/src/tracker-store/tracker-config.h
+++ b/src/tracker-store/tracker-config.h
@@ -49,12 +49,8 @@ GType tracker_config_get_type (void) G_GNUC_CONST;
TrackerConfig *tracker_config_new (void);
gboolean tracker_config_save (TrackerConfig *config);
gint tracker_config_get_verbosity (TrackerConfig *config);
-gboolean tracker_config_get_low_memory_mode (TrackerConfig *config);
-
void tracker_config_set_verbosity (TrackerConfig *config,
gint value);
-void tracker_config_set_low_memory_mode (TrackerConfig *config,
- gboolean value);
G_END_DECLS
diff --git a/src/tracker-store/tracker-main.c b/src/tracker-store/tracker-main.c
index 962ddcd..0c3ddcf 100644
--- a/src/tracker-store/tracker-main.c
+++ b/src/tracker-store/tracker-main.c
@@ -85,7 +85,6 @@ static GStaticPrivate private_key = G_STATIC_PRIVATE_INIT;
/* Private command line parameters */
static gboolean version;
static gint verbosity = -1;
-static gboolean low_memory;
static gboolean force_reindex;
static gboolean readonly_mode;
@@ -100,10 +99,6 @@ static GOptionEntry entries[] = {
N_("Logging, 0 = errors only, "
"1 = minimal, 2 = detailed and 3 = debug (default = 0)"),
NULL },
- { "low-memory", 'm', 0,
- G_OPTION_ARG_NONE, &low_memory,
- N_("Minimizes the use of memory but may slow indexing down"),
- NULL },
/* Indexer options */
{ "force-reindex", 'r', 0,
@@ -137,8 +132,6 @@ sanity_check_option_values (TrackerConfig *config)
g_message ("General options:");
g_message (" Verbosity ............................ %d",
tracker_config_get_verbosity (config));
- g_message (" Low memory mode ...................... %s",
- tracker_config_get_low_memory_mode (config) ? "yes" : "no");
g_message ("Store options:");
g_message (" Readonly mode ........................ %s",
@@ -417,10 +410,6 @@ main (gint argc, gchar *argv[])
config_verbosity_changed_cb (G_OBJECT (config), NULL, NULL);
}
- if (low_memory) {
- tracker_config_set_low_memory_mode (config, TRUE);
- }
-
initialize_directories ();
if (!tracker_dbus_init ()) {
@@ -443,10 +432,6 @@ main (gint argc, gchar *argv[])
flags |= TRACKER_DB_MANAGER_FORCE_REINDEX;
}
- if (tracker_config_get_low_memory_mode (config)) {
- flags |= TRACKER_DB_MANAGER_LOW_MEMORY_MODE;
- }
-
notifier = tracker_dbus_register_notifier ();
busy_callback = tracker_status_get_callback (notifier,
&busy_user_data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]