[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-sync.c, 1.181.2.1, 1.181.2.2

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


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

Modified Files:
      Tag: branch_1_0
	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.181.2.1
retrieving revision 1.181.2.2
diff -u -d -r1.181.2.1 -r1.181.2.2
--- mbox-sync.c	17 Jun 2006 20:03:17 -0000	1.181.2.1
+++ mbox-sync.c	13 Oct 2006 19:54:04 -0000	1.181.2.2
@@ -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;
@@ -1640,7 +1641,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