[dovecot-cvs] dovecot/src/master imap-process.c,1.8,1.9 settings.c,1.18,1.19 settings.h,1.12,1.13

cras at procontrol.fi cras at procontrol.fi
Thu Nov 21 22:31:05 EET 2002


Update of /home/cvs/dovecot/src/master
In directory danu:/tmp/cvs-serv12327/src/master

Modified Files:
	imap-process.c settings.c settings.h 
Log Message:
mail_read_mmaped: Use mmap() instead of read() to read mail files. read()
seems to be a bit faster with my Linux/x86 and it's better with NFS, so
that's the default.



Index: imap-process.c
===================================================================
RCS file: /home/cvs/dovecot/src/master/imap-process.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- imap-process.c	21 Nov 2002 20:13:32 -0000	1.8
+++ imap-process.c	21 Nov 2002 20:31:03 -0000	1.9
@@ -124,6 +124,8 @@
 
 	if (set_mail_save_crlf)
 		putenv("MAIL_SAVE_CRLF=1");
+	if (set_mail_read_mmaped)
+		putenv("MAIL_READ_MMAPED=1");
 	if (set_maildir_copy_with_hardlinks)
 		putenv("MAILDIR_COPY_WITH_HARDLINKS=1");
 	if (set_maildir_check_content_changes)

Index: settings.c
===================================================================
RCS file: /home/cvs/dovecot/src/master/settings.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- settings.c	21 Nov 2002 20:13:32 -0000	1.18
+++ settings.c	21 Nov 2002 20:31:03 -0000	1.19
@@ -62,6 +62,7 @@
 	{ "mailbox_check_interval",
 				SET_INT, &set_mailbox_check_interval },
 	{ "mail_save_crlf",	SET_BOOL,&set_mail_save_crlf },
+	{ "mail_read_mmaped",	SET_BOOL,&set_mail_read_mmaped },
 	{ "maildir_copy_with_hardlinks",
 				SET_BOOL,&set_maildir_copy_with_hardlinks },
 	{ "maildir_check_content_changes",
@@ -121,6 +122,7 @@
 char *set_mail_never_cache_fields = NULL;
 unsigned int set_mailbox_check_interval = 30;
 int set_mail_save_crlf = FALSE;
+int set_mail_read_mmaped = FALSE;
 int set_maildir_copy_with_hardlinks = FALSE;
 int set_maildir_check_content_changes = FALSE;
 char *set_mbox_locks = "dotlock fcntl flock";

Index: settings.h
===================================================================
RCS file: /home/cvs/dovecot/src/master/settings.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- settings.h	21 Nov 2002 20:13:32 -0000	1.12
+++ settings.h	21 Nov 2002 20:31:03 -0000	1.13
@@ -43,6 +43,7 @@
 extern char *set_mail_never_cache_fields;
 extern unsigned int set_mailbox_check_interval;
 extern int set_mail_save_crlf;
+extern int set_mail_read_mmaped;
 extern int set_maildir_copy_with_hardlinks;
 extern int set_maildir_check_content_changes;
 extern char *set_mbox_locks;




More information about the dovecot-cvs mailing list