dovecot-2.2: pop3: Optimize POP3 UIDL processing when duplicate ...

dovecot at dovecot.org dovecot at dovecot.org
Wed Sep 10 10:49:38 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/be21e17813d4
changeset: 17776:be21e17813d4
user:      Michael M Slusarz <slusarz at curecanti.org>
date:      Tue Sep 09 17:26:52 2014 -0600
description:
pop3: Optimize POP3 UIDL processing when duplicate renaming is not active.

diffstat:

 src/pop3/pop3-commands.c |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r 4412508cbc59 -r be21e17813d4 src/pop3/pop3-commands.c
--- a/src/pop3/pop3-commands.c	Wed Sep 10 13:39:37 2014 +0300
+++ b/src/pop3/pop3-commands.c	Tue Sep 09 17:26:52 2014 -0600
@@ -784,7 +784,9 @@
 
 	uidl_duplicates_rename =
 		strcmp(client->set->pop3_uidl_duplicates, "rename") == 0;
-	hash_table_create(&prev_uidls, default_pool, 0, str_hash, strcmp);
+	if (uidl_duplicates_rename)
+		hash_table_create(&prev_uidls, default_pool, 0, str_hash,
+				  strcmp);
 	client->uidl_pool = pool_alloconly_create("message uidls", 1024);
 
 	/* first read all the UIDLs into a temporary [seq] array */
@@ -804,10 +806,12 @@
 			mail_update_pop3_uidl(mail, uidl);
 
 		seq_uidls[mail->seq-1] = uidl;
-		hash_table_insert(prev_uidls, uidl, POINTER_CAST(1));
+		if (uidl_duplicates_rename)
+			hash_table_insert(prev_uidls, uidl, POINTER_CAST(1));
 	}
 	(void)mailbox_search_deinit(&search_ctx);
-	hash_table_destroy(&prev_uidls);
+	if (uidl_duplicates_rename)
+		hash_table_destroy(&prev_uidls);
 
 	if (failed) {
 		pool_unref(&client->uidl_pool);


More information about the dovecot-cvs mailing list