[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-sync.c, 1.185, 1.186

tss at dovecot.org tss at dovecot.org
Fri Oct 13 20:54:08 UTC 2006


Update of /var/lib/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv579

Modified Files:
	mbox-sync.c 
Log Message:
Clear the keywords pool for each mail, so we don't waste memory. Also we can
shrink the initial pool size.



Index: mbox-sync.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync.c,v
retrieving revision 1.185
retrieving revision 1.186
diff -u -d -r1.185 -r1.186
--- mbox-sync.c	10 Sep 2006 12:48:28 -0000	1.185
+++ mbox-sync.c	13 Oct 2006 19:54:05 -0000	1.186
@@ -105,6 +105,7 @@
 	if (istream_raw_mbox_is_eof(sync_ctx->input))
 		return 0;
 
+	p_clear(sync_ctx->mail_keyword_pool);
 	memset(mail_ctx, 0, sizeof(*mail_ctx));
 	mail_ctx->sync_ctx = sync_ctx;
 	mail_ctx->seq = ++sync_ctx->seq;
@@ -1637,7 +1638,8 @@
 	sync_ctx.index_sync_ctx = index_sync_ctx;
 	sync_ctx.sync_view = sync_view;
 	sync_ctx.t = mail_index_transaction_begin(sync_view, FALSE, TRUE);
-	sync_ctx.mail_keyword_pool = pool_alloconly_create("keywords", 4096);
+	sync_ctx.mail_keyword_pool =
+		pool_alloconly_create("mbox keywords", 256);
 
 	/* make sure we've read the latest keywords in index */
 	(void)mail_index_get_keywords(mbox->ibox.index);



More information about the dovecot-cvs mailing list