changeset 15569:c9e6ad8a42db

lib-index: Optimized single sequence lookup of newly created mails in transaction view.
author lion@ubuntu.ubuntu-domain
date Fri, 07 Dec 2012 08:50:35 +0400
parents 7f4835cff04a
children abcc9959b757
files src/lib-index/mail-index-transaction-view.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-index/mail-index-transaction-view.c	Fri Dec 07 08:50:35 2012 +0400
+++ b/src/lib-index/mail-index-transaction-view.c	Fri Dec 07 08:50:35 2012 +0400
@@ -208,6 +208,12 @@
 			return;
 		}
 		*first_seq_r = seq;
+
+		if (rec->uid == last_uid) {
+			/* one seq in range */
+			*last_seq_r = seq;
+			return;
+		}
 	}
 
 	seq = tview->t->last_new_seq;