From 126fa0e74a3c59c41bfa871510e85c80b3c39140 Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Fri, 1 Jul 2011 01:20:05 +0300 Subject: [PATCH] * make threading much faster, removing some safety checks --- src/mu-threader-utils.c | 3 ++- src/mu-threader.c | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/mu-threader-utils.c b/src/mu-threader-utils.c index e6197835..d4dccc71 100644 --- a/src/mu-threader-utils.c +++ b/src/mu-threader-utils.c @@ -76,6 +76,7 @@ find_last (Container *c) } +#if 0 static gboolean check_dup (Container *c, GHashTable *hash) { @@ -103,7 +104,7 @@ assert_no_duplicates (Container *c) g_hash_table_destroy (hash); } - +#endif Container* diff --git a/src/mu-threader.c b/src/mu-threader.c index eb93a5ad..b889d4ec 100644 --- a/src/mu-threader.c +++ b/src/mu-threader.c @@ -97,7 +97,7 @@ mu_threader_calculate (MuMsgIter *iter, size_t matchnum) } - +#if 0 static void check_dup (const char *msgid, Container *c, GHashTable *hash) @@ -124,7 +124,7 @@ assert_no_duplicates (GHashTable *ids) g_hash_table_destroy (hash); } - +#endif @@ -142,7 +142,7 @@ find_or_create_referred (GHashTable *id_table, const char *msgid, if (!c) { c = container_new (NULL, 0, msgid); g_hash_table_insert (id_table, (gpointer)msgid, c); - assert_no_duplicates (id_table); + /* assert_no_duplicates (id_table); */ } @@ -187,7 +187,7 @@ find_or_create (GHashTable *id_table, MuMsg *msg, guint docid) c = container_append_children (c, c2); g_hash_table_insert (id_table, (gpointer)mu_msg_get_path (msg), c2); - assert_no_duplicates (id_table); + /* assert_no_duplicates (id_table); */ return NULL; /* don't process this message further */ } @@ -196,7 +196,7 @@ find_or_create (GHashTable *id_table, MuMsg *msg, guint docid) Message-ID in id_table. */ c = container_new (msg, docid, msgid); g_hash_table_insert (id_table, (gpointer)msgid, c); - assert_no_duplicates (id_table); + /* assert_no_duplicates (id_table); */ return c; }