[dovecot-cvs] dovecot/src/imap Makefile.am, 1.33, 1.34 imap-thread.c, 1.21, 1.22 imap-thread.h, 1.3, 1.4 main.c, 1.78, 1.79
cras at dovecot.org
cras at dovecot.org
Tue Jul 11 19:08:00 EEST 2006
Update of /var/lib/cvs/dovecot/src/imap
In directory talvi:/tmp/cvs-serv6684
Modified Files:
Makefile.am imap-thread.c imap-thread.h main.c
Log Message:
THREAD command handling is now done through a hash index file. This speeds
up the threading most of the time when the thread hash exists.
With in-memory indexes the hash is kept in memory, but it gets the same
benefits for subsequent THREAD commands as long as the mailbox is kept open.
Index: Makefile.am
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/Makefile.am,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- Makefile.am 27 Jun 2006 21:03:54 -0000 1.33
+++ Makefile.am 11 Jul 2006 16:07:57 -0000 1.34
@@ -7,6 +7,7 @@
-I$(top_srcdir)/src/lib-dict \
-I$(top_srcdir)/src/lib-mail \
-I$(top_srcdir)/src/lib-imap \
+ -I$(top_srcdir)/src/lib-index \
-I$(top_srcdir)/src/lib-storage \
-DMODULEDIR=\""$(moduledir)"\"
Index: imap-thread.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/imap-thread.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- imap-thread.c 15 May 2006 09:47:34 -0000 1.21
+++ imap-thread.c 11 Jul 2006 16:07:57 -0000 1.22
@@ -1,649 +1,1252 @@
-/* Copyright (C) 2002 Timo Sirainen */
+/* Copyright (C) 2002-2006 Timo Sirainen */
-/*
- * Merge sort code in sort_nodes() is copyright 2001 Simon Tatham.
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use,
- * copy, modify, merge, publish, distribute, sublicense, and/or
[...2645 lines suppressed...]
+ imap_thread_expunge_handler,
+ tbox, TRUE);
+ box->v.close = imap_thread_mailbox_close;
+ array_idx_set(&box->module_contexts,
+ imap_thread_storage_module_id, &tbox);
+}
+
+void imap_thread_init(void)
+{
+ next_hook_mailbox_opened = hook_mailbox_opened;
+ hook_mailbox_opened = imap_thread_mailbox_opened;
+
+ imap_thread_storage_module_id = mail_storage_module_id++;
+}
+
+void imap_thread_deinit(void)
+{
+ i_assert(hook_mailbox_opened == imap_thread_mailbox_opened);
+ hook_mailbox_opened = next_hook_mailbox_opened;
}
Index: imap-thread.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/imap-thread.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- imap-thread.h 5 Feb 2005 18:07:26 -0000 1.3
+++ imap-thread.h 11 Jul 2006 16:07:57 -0000 1.4
@@ -10,4 +10,7 @@
int imap_thread(struct client_command_context *cmd, const char *charset,
struct mail_search_arg *args, enum mail_thread_type type);
+void imap_thread_init(void);
+void imap_thread_deinit(void);
+
#endif
Index: main.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/main.c,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -d -r1.78 -r1.79
--- main.c 27 Jun 2006 21:03:54 -0000 1.78
+++ main.c 11 Jul 2006 16:07:57 -0000 1.79
@@ -15,6 +15,7 @@
#include "mail-storage.h"
#include "commands.h"
#include "namespace.h"
+#include "imap-thread.h"
#include <stdio.h>
#include <stdlib.h>
@@ -176,6 +177,7 @@
mail_storage_register_all();
clients_init();
commands_init();
+ imap_thread_init();
if (getenv("MAIL_PLUGINS") == NULL)
modules = NULL;
@@ -236,6 +238,7 @@
clients_deinit();
module_dir_unload(&modules);
+ imap_thread_deinit();
commands_deinit();
mail_storage_deinit();
dict_client_unregister();
More information about the dovecot-cvs
mailing list