notmuch clon
Find a file
Stewart Smith a45ff8c361 Read mail directory in inode number order
This gives a rather decent reduction in number of seeks required when
reading a Maildir that isn't in pagecache.

Most filesystems give some locality on disk based on inode numbers.
In ext[234] this is the inode tables, in XFS groups of sequential inode
numbers are together on disk and the most significant bits indicate
allocation group (i.e inode 1,000,000 is always after inode 1,000).

With this patch, we read in the whole directory, sort by inode number
before stat()ing the contents.

Ideally, directory is sequential and then we make one scan through the
file system stat()ing.

Since the universe is not ideal, we'll probably seek during reading the
directory and a fair bit while reading the inodes themselves.

However... with readahead, and stat()ing in inode order, we should be
in the best place possible to hit the cache.

In a (not very good) benchmark of "how long does it take to find the first
15,000 messages in my Maildir after 'echo 3 > /proc/sys/vm/drop_caches'",
this patch consistently cut at least 8 seconds off the scan time.

Without patch: 50 seconds
With patch: 38-42 seconds.

(I did this in a previous maildir reading project and saw large improvements too)
2009-11-18 22:25:41 +01:00
lib Typsos 2009-11-18 03:21:36 -08:00
.gitignore Update .gitignore, add objects and static archives 2009-11-17 12:34:04 -08:00
AUTHORS Drop date.c file, (use identical function from GMime instead). 2009-11-02 14:36:33 -08:00
configure Add a simple configure script. 2009-11-02 09:11:37 -08:00
COPYING Add copy of GNU General Public License (version 3). 2009-10-21 16:25:08 -07:00
COPYING-GPL-3 Add copy of GNU General Public License (version 3). 2009-10-21 16:25:08 -07:00
gmime-filter-reply.c notmuch reply: Add (incomplete) reply command 2009-11-10 13:32:02 -08:00
gmime-filter-reply.h Typsos 2009-11-18 03:21:36 -08:00
INSTALL Add an INSTALL file. 2009-11-02 09:25:04 -08:00
Makefile Typsos 2009-11-18 03:21:36 -08:00
Makefile.config Makefile: Change default install prefix from /usr to /usr/local, really 2009-11-17 13:11:20 -08:00
Makefile.local Fix linking with gcc to use g++ to link in C++ libs. 2009-11-18 05:34:02 -08:00
notmuch-client.h notmuch help: Update documentation (following recent text from notmuch.1) 2009-11-17 23:37:21 -08:00
notmuch-completion.bash Typsos 2009-11-18 03:21:36 -08:00
notmuch-config.c Deal with situation where sysconf(_SC_GETPW_R_SIZE_MAX) returns -1 2009-11-17 12:27:49 -08:00
notmuch-dump.c libnotmuch: Underlying support for doing partial-results searches. 2009-11-12 16:47:27 -08:00
notmuch-new.c Read mail directory in inode number order 2009-11-18 22:25:41 +01:00
notmuch-reply.c notmuch_message_file_get_header returns "" for missing headers, not NULL 2009-11-16 22:10:36 -08:00
notmuch-restore.c notmuch restore was skipping entries with no new tags 2009-11-16 12:03:05 -08:00
notmuch-search.c notmuch search: Avoid infinite stream of exceptions from "notmuch search" 2009-11-18 03:29:30 -08:00
notmuch-setup.c notmuch new: Unbreak after the addition of notmuch-config. 2009-11-11 19:50:15 -08:00
notmuch-show.c notmuch show: Detect an internal error if a thread has no messages. 2009-11-17 17:55:45 -08:00
notmuch-tag.c notmuch new/tag: Flush all changes to database when interrupted. 2009-11-13 09:05:13 -08:00
notmuch-time.c Add some const correctness to talloc 'ctx' parameter. 2009-11-17 19:10:37 -08:00
notmuch.1 notmuch.1: Fix a couple of typos. 2009-11-17 23:36:44 -08:00
notmuch.c notmuch main(): Remove stale comment. 2009-11-18 05:22:14 -08:00
notmuch.el Make '?" bring up a list of bindings. 2009-11-18 19:12:13 +01:00
query-string.c notmuch: Break notmuch.c up into several smaller files. 2009-11-10 12:03:05 -08:00
README README: Mention the actual mailing list address now that it exists. 2009-11-18 03:24:27 -08:00
show-message.c Typsos 2009-11-18 03:21:36 -08:00
TODO TODO: Add note on making "notmuch new" interruptible. 2009-11-12 09:35:03 -08:00

Notmuch - thread-based email index, search and tagging.

Notmuch is a system for indexing, searching, reading, and tagging
large collections of email messages. It uses the Xapian library to
provide fast, full-text search of very large collection of email with
a very convenient search syntax.

Notmuch is free software, released under the GNU General Public
License version 3 (or later).

Building notmuch
----------------
See the INSTALL file for notes on compiling and installing notmuch.

Contacting users and developers
-------------------------------
The website for Notmuch is:

	http://notmuchmail.org

The mailing list address for the notmuch community is:

	notmuch@notmuchmail.org

We welcome any sort of questions, comments, kudos, or code there.

Subscription is not required, (but if you do subscribe you'll avoid
any delay due to moderation). See the website for subscription
information.

There is also an IRC channel dedicated to talk about using and
developing notmuch:

	IRC server:	irc.freenode.net
	Channel:	#notmuch

Interface options
-----------------
Notmuch includes a "notmuch" command-line interface to the system.
This is not a very convenient interface and it is not expected that
users will find it satisfying. Instead, there are two option for
obtaining a more sophisticated interface:

     1. Build on top of the "notmuch" command-line interface.

	This might be a reasonable option for a very text-oriented
	client environment. For example, an emacs-based interface for
	notmuch is already under development and is available in the
	notmuch.el file in this distribution.

	If someone were to write a curses-based interface, or similar,
	it might also be reasonable to build on the "notmuch"
	command-line interface.

     2. Build on top of the notmuch library interface.

	This is a better choice for developing an interface that has
	full control of the presentation of email threads and
	messages. It is expected that anyone integrating Notmuch into
	an existing, graphical email program use the notmuch library
	interface.

	The public interface to the notmuch library is contained in
	the notmuch.h header file. The "notmuch" command-line program
	in notmuch.c can be used as good example code, since it is a
	simple program that is written on top of the library
	interface.

As can be seen, alternate interfaces to the Notmuch mail system are
still in development. We would appreciate any contributions to these
efforts.