dovecot-2.2: lib-index: Optimized single sequence lookup of newl...

dovecot at dovecot.org dovecot at dovecot.org
Sat Jan 5 01:14:36 EET 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/c9e6ad8a42db
changeset: 15569:c9e6ad8a42db
user:      lion at ubuntu.ubuntu-domain
date:      Fri Dec 07 08:50:35 2012 +0400
description:
lib-index: Optimized single sequence lookup of newly created mails in transaction view.

diffstat:

 src/lib-index/mail-index-transaction-view.c |  6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diffs (16 lines):

diff -r 7f4835cff04a -r c9e6ad8a42db src/lib-index/mail-index-transaction-view.c
--- 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;


More information about the dovecot-cvs mailing list