aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog5
-rw-r--r--mail/message-list.c5
2 files changed, 9 insertions, 1 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 3ae48299d6..dbe8443ec3 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,8 @@
+2008-08-05 Srinivasa Ragavan <sragavan@novell.com>
+
+ * mail/message-list.c: Fix a performance issue, where we can just go
+ by the presence than the exact count.
+
2008-08-04 Matthew Barnes <mbarnes@redhat.com>
* em-migrate.c (migrate_to_db):
diff --git a/mail/message-list.c b/mail/message-list.c
index 6467f73d7a..e12d304505 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -3645,6 +3645,9 @@ glib_crapback(void *key, void *data, void *x)
struct _glibsuxcrap *y = x;
CamelMessageInfo *mi;
+ if(y->count)
+ return;
+
mi = camel_folder_get_message_info(y->folder, key);
if (mi) {
y->count++;
@@ -3652,7 +3655,7 @@ glib_crapback(void *key, void *data, void *x)
}
}
-/* returns number of hidden messages */
+/* returns 0 or 1 depending if there are hidden messages */
unsigned int
message_list_hidden(MessageList *ml)
{