[evolution-data-server/gnome-3-6] Bug 687694 - imapx_untagged_vanished() is inefficient
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/gnome-3-6] Bug 687694 - imapx_untagged_vanished() is inefficient
- Date: Wed, 7 Nov 2012 12:32:35 +0000 (UTC)
commit 88ae806e70ac9902170b2ad899fef5aadf797d8a
Author: Dan Williams <dcbw redhat com>
Date: Wed Nov 7 06:59:51 2012 -0500
Bug 687694 - imapx_untagged_vanished() is inefficient
For uid->len = 318320, timing the loop yields:
g_list_append(): 60+ seconds
g_list_prepend(): 0.3 seconds
(cherry picked from commit ffd4d6931fd5af8624610825dd026139a6926a38)
camel/camel-imapx-server.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/camel/camel-imapx-server.c b/camel/camel-imapx-server.c
index 6a9a775..8b3a6e6 100644
--- a/camel/camel-imapx-server.c
+++ b/camel/camel-imapx-server.c
@@ -1511,9 +1511,10 @@ imapx_untagged_vanished (CamelIMAPXServer *is,
c (is->tagprefix, "vanished: %s\n", uid);
- uid_list = g_list_append (uid_list, uid);
+ uid_list = g_list_prepend (uid_list, uid);
camel_folder_change_info_remove_uid (is->changes, uid);
}
+ uid_list = g_list_reverse (uid_list);
camel_folder_summary_remove_uids (is->select_folder->summary, uid_list);
is->expunged = g_list_concat (is->expunged, uid_list);
g_ptr_array_free (uids, FALSE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]