]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-index: Avoid getting expunged-status in index lookups when not necessary.
authorTimo Sirainen <tss@iki.fi>
Sat, 16 Feb 2013 11:58:14 +0000 (13:58 +0200)
committerTimo Sirainen <tss@iki.fi>
Sat, 16 Feb 2013 11:58:14 +0000 (13:58 +0200)
This especially improves dsync performance.

src/lib-index/mail-cache-lookup.c
src/lib-index/mail-cache-transaction.c

index 8592fa4c67b5edd58841d71cb00efc65af794c5c..98573e31fb9d94ef67650b773401d7f3534e3bc1 100644 (file)
@@ -63,10 +63,8 @@ uint32_t mail_cache_lookup_cur_offset(struct mail_index_view *view,
        struct mail_index_map *map;
        const void *data;
        uint32_t offset;
-       bool expunged;
 
-       mail_index_lookup_ext_full(view, seq, cache->ext_id,
-                                  &map, &data, &expunged);
+       mail_index_lookup_ext_full(view, seq, cache->ext_id, &map, &data, NULL);
        if (data == NULL) {
                /* no cache offsets */
                return 0;
index 87592ead55424c7a1bebeab4acdba5f2dad5df0b..ae7985028e3df07db0323117f4c063df7be3a7c9 100644 (file)
@@ -308,7 +308,6 @@ mail_cache_link_records(struct mail_cache_transaction_ctx *ctx,
        ARRAY_TYPE(uint32_t) seq_offsets;
        uint32_t i, seq_count, reset_id, prev_offset, *offsetp;
        const void *data;
-       bool expunged;
 
        i_assert(ctx->min_seq != 0);
 
@@ -323,7 +322,7 @@ mail_cache_link_records(struct mail_cache_transaction_ctx *ctx,
                else {
                        mail_index_lookup_ext_full(ctx->view->trans_view, seqs[i],
                                                   ctx->cache->ext_id, &map,
-                                                  &data, &expunged);
+                                                  &data, NULL);
                        prev_offsetp = data;
 
                        if (prev_offsetp == NULL || *prev_offsetp == 0)