]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-index: Optimized single sequence lookup of newly created mails in transaction...
authorlion@ubuntu.ubuntu-domain <lion@ubuntu.ubuntu-domain>
Fri, 7 Dec 2012 04:50:35 +0000 (08:50 +0400)
committerlion@ubuntu.ubuntu-domain <lion@ubuntu.ubuntu-domain>
Fri, 7 Dec 2012 04:50:35 +0000 (08:50 +0400)
src/lib-index/mail-index-transaction-view.c

index b2bbee91326e1ff4b53cf6df15823d6e875b5286..fbe1e98c3f576f750541ebd1493c86e835640570 100644 (file)
@@ -208,6 +208,12 @@ static void tview_lookup_seq_range(struct mail_index_view *view,
                        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;