dovecot-2.2: lib-storage: Avoid wasting data stack during searches.
dovecot at dovecot.org
dovecot at dovecot.org
Sat Apr 20 21:58:08 EEST 2013
details: http://hg.dovecot.org/dovecot-2.2/rev/e819374de157
changeset: 16306:e819374de157
user: Timo Sirainen <tss at iki.fi>
date: Sat Apr 20 21:57:47 2013 +0300
description:
lib-storage: Avoid wasting data stack during searches.
diffstat:
src/lib-storage/index/index-search.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diffs (38 lines):
diff -r 994488139eca -r e819374de157 src/lib-storage/index/index-search.c
--- a/src/lib-storage/index/index-search.c Sat Apr 20 21:02:30 2013 +0300
+++ b/src/lib-storage/index/index-search.c Sat Apr 20 21:57:47 2013 +0300
@@ -1377,7 +1377,9 @@
}
for (i = 0; i < n && ret < 0; i++) {
ctx->cur_mail->lookup_abort = cache_lookups[i];
- ret = search_match_once(ctx);
+ T_BEGIN {
+ ret = search_match_once(ctx);
+ } T_END;
}
ctx->cur_mail->lookup_abort = MAIL_LOOKUP_ABORT_NEVER;
search_match_finish(ctx, ret);
@@ -1556,7 +1558,9 @@
int ret = 0;
while ((mail = index_search_get_mail(ctx)) != NULL) {
- ret = search_more_with_mail(ctx, mail);
+ T_BEGIN {
+ ret = search_more_with_mail(ctx, mail);
+ } T_END;
if (ret <= 0)
break;
@@ -1612,8 +1616,10 @@
mail_search_args_result_deserialize(ctx->mail_ctx.args,
imail->data.search_results->data,
imail->data.search_results->used);
- ret = search_match_once(ctx);
- search_match_finish(ctx, ret);
+ T_BEGIN {
+ ret = search_match_once(ctx);
+ search_match_finish(ctx, ret);
+ } T_END;
ctx->cur_mail = NULL;
return ret > 0;
}
More information about the dovecot-cvs
mailing list