* make threading much faster, removing some safety checks

This commit is contained in:
Dirk-Jan C. Binnema 2011-07-01 01:20:05 +03:00
parent eb7b7e4ea0
commit 126fa0e74a
2 changed files with 7 additions and 6 deletions

View File

@ -76,6 +76,7 @@ find_last (Container *c)
} }
#if 0
static gboolean static gboolean
check_dup (Container *c, GHashTable *hash) check_dup (Container *c, GHashTable *hash)
{ {
@ -103,7 +104,7 @@ assert_no_duplicates (Container *c)
g_hash_table_destroy (hash); g_hash_table_destroy (hash);
} }
#endif
Container* Container*

View File

@ -97,7 +97,7 @@ mu_threader_calculate (MuMsgIter *iter, size_t matchnum)
} }
#if 0
static void static void
check_dup (const char *msgid, Container *c, GHashTable *hash) check_dup (const char *msgid, Container *c, GHashTable *hash)
@ -124,7 +124,7 @@ assert_no_duplicates (GHashTable *ids)
g_hash_table_destroy (hash); g_hash_table_destroy (hash);
} }
#endif
@ -142,7 +142,7 @@ find_or_create_referred (GHashTable *id_table, const char *msgid,
if (!c) { if (!c) {
c = container_new (NULL, 0, msgid); c = container_new (NULL, 0, msgid);
g_hash_table_insert (id_table, (gpointer)msgid, c); 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); c = container_append_children (c, c2);
g_hash_table_insert (id_table, g_hash_table_insert (id_table,
(gpointer)mu_msg_get_path (msg), c2); (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 */ 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. */ Message-ID in id_table. */
c = container_new (msg, docid, msgid); c = container_new (msg, docid, msgid);
g_hash_table_insert (id_table, (gpointer)msgid, c); g_hash_table_insert (id_table, (gpointer)msgid, c);
assert_no_duplicates (id_table); /* assert_no_duplicates (id_table); */
return c; return c;
} }