[anjuta] symbol-db: minor performance bugfix.
- From: Massimo Cora' <mcora src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta] symbol-db: minor performance bugfix.
- Date: Wed, 28 Dec 2011 23:22:25 +0000 (UTC)
commit f71944c97762eebfc875ffdf08c89ea659a14b0e
Author: Massimo Corà <mcora src gnome org>
Date: Thu Dec 29 00:09:44 2011 +0100
symbol-db: minor performance bugfix.
plugins/symbol-db/plugin.c | 17 ++++++++++++-----
plugins/symbol-db/symbol-db-engine-core.c | 2 +-
2 files changed, 13 insertions(+), 6 deletions(-)
---
diff --git a/plugins/symbol-db/plugin.c b/plugins/symbol-db/plugin.c
index d4106b1..b714e5e 100644
--- a/plugins/symbol-db/plugin.c
+++ b/plugins/symbol-db/plugin.c
@@ -1348,10 +1348,10 @@ static gboolean
do_check_offline_files_changed (SymbolDBPlugin *sdb_plugin)
{
GList * prj_elements_list;
+ GList *node;
IAnjutaProjectManager *pm;
GHashTable *prj_elements_hash;
GPtrArray *to_add_files = NULL;
- gint i;
gint real_added = 0;
pm = anjuta_shell_get_interface (ANJUTA_PLUGIN (sdb_plugin)->shell,
@@ -1366,19 +1366,22 @@ do_check_offline_files_changed (SymbolDBPlugin *sdb_plugin)
*/
prj_elements_hash = g_hash_table_new_full (g_str_hash, g_str_equal,
NULL, g_free);
-
- for (i = 0; i < g_list_length (prj_elements_list); i++)
+
+ node = prj_elements_list;
+ while (node != NULL)
{
GFile *gfile;
gchar *filename;
- gfile = (GFile *)g_list_nth_data (prj_elements_list, i);
-
+ gfile = node->data;
+
if ((filename = g_file_get_path (gfile)) == NULL ||
g_strcmp0 (filename, "") == 0)
{
if (gfile)
g_object_unref (gfile);
+
+ node = g_list_next (node);
continue;
}
@@ -1387,6 +1390,8 @@ do_check_offline_files_changed (SymbolDBPlugin *sdb_plugin)
{
if (gfile)
g_object_unref (gfile);
+
+ node = g_list_next (node);
continue;
}
@@ -1399,6 +1404,8 @@ do_check_offline_files_changed (SymbolDBPlugin *sdb_plugin)
filename),
filename);
g_object_unref (gfile);
+
+ node = g_list_next (node);
}
diff --git a/plugins/symbol-db/symbol-db-engine-core.c b/plugins/symbol-db/symbol-db-engine-core.c
index dc65cd5..7e1b51a 100644
--- a/plugins/symbol-db/symbol-db-engine-core.c
+++ b/plugins/symbol-db/symbol-db-engine-core.c
@@ -4916,7 +4916,7 @@ sdb_engine_add_new_symbol (SymbolDBEngine * dbe, const tagEntry * tag_entry,
if (error)
{
- DEBUG_PRINT ("SQL parsing failed: %s", error->message);
+ g_warning ("SQL execute_non_select failed: %s", error->message);
g_error_free (error);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]