From dff4ba705503c7414e9ca60fc4476024bdfd968b Mon Sep 17 00:00:00 2001 From: Srinivasa Ragavan Date: Tue, 5 Aug 2008 13:38:05 +0000 Subject: Fix a performance issue, where we can just go by the presence than the 2008-08-05 Srinivasa Ragavan * mail/message-list.c: Fix a performance issue, where we can just go by the presence than the exact count. svn path=/trunk/; revision=35907 --- mail/ChangeLog | 5 +++++ mail/message-list.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'mail') 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 + + * 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 * 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) { -- cgit v1.2.3