diff options
author | Srinivasa Ragavan <sragavan@novell.com> | 2008-08-05 21:38:05 +0800 |
---|---|---|
committer | Srinivasa Ragavan <sragavan@src.gnome.org> | 2008-08-05 21:38:05 +0800 |
commit | dff4ba705503c7414e9ca60fc4476024bdfd968b (patch) | |
tree | 41512666fa265008787056972af9452b06c85f1a /mail | |
parent | 55dc5399a3653939f122d0fb7e83c5b9c1c8c018 (diff) | |
download | gsoc2013-evolution-dff4ba705503c7414e9ca60fc4476024bdfd968b.tar gsoc2013-evolution-dff4ba705503c7414e9ca60fc4476024bdfd968b.tar.gz gsoc2013-evolution-dff4ba705503c7414e9ca60fc4476024bdfd968b.tar.bz2 gsoc2013-evolution-dff4ba705503c7414e9ca60fc4476024bdfd968b.tar.lz gsoc2013-evolution-dff4ba705503c7414e9ca60fc4476024bdfd968b.tar.xz gsoc2013-evolution-dff4ba705503c7414e9ca60fc4476024bdfd968b.tar.zst gsoc2013-evolution-dff4ba705503c7414e9ca60fc4476024bdfd968b.zip |
Fix a performance issue, where we can just go by the presence than the
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.
svn path=/trunk/; revision=35907
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 5 | ||||
-rw-r--r-- | mail/message-list.c | 5 |
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) { |