aboutsummaryrefslogtreecommitdiff
path: root/notmuch-new.c
Commit message (Collapse)AuthorAge
...
* notmuch: Add Maildir directory name as tag name for messagesAneesh Kumar K.V2009-11-21
| | | | | | | | This patch adds maildir directory name as the tag name for messages. This helps in adding tags using filtering already provided by procmail. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
* notmuch new: Restore printout of total files counted.Carl Worth2009-11-19
| | | | This was more fallout from the recent re-shuffling of this code.
* notmuch new: Fix countdown timer on first run.Carl Worth2009-11-19
| | | | | A recent shuffling of this code accidentally disabled the timer, (making the time spent counting the files totally useless).
* count_files: sort directory in inode order before stattingStewart Smith2009-11-18
| | | | | | Carl says: This has similar performance benefits as the previous patch, and I fixed similar style issues here as well, (including missing more of a commit message than the one-line summary).
* Minor style fixups for the previous fix.Carl Worth2009-11-18
| | | | | Use consistent whitespace, a slightly less abbreviated identifier, and avoid a C99 declaration after statement.
* Read mail directory in inode number orderStewart Smith2009-11-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* TypsosIngmar Vanhassel2009-11-18
|
* notmuch new/tag: Flush all changes to database when interrupted.Keith Packard2009-11-13
| | | | | | By installing a signal handler for SIGINT we can ensure that no work that is already complete will be lost if the user interrupts a "notmuch new" run with Control-C.
* notmuch new: Don't ignore files with mtime of 0.Carl Worth2009-11-12
| | | | | | | | | I recently discovered that mb2md has the annoying bug of creating files with mtime of 0, and notmuch then promptly ignored them, (thinking that its timestamps initialized to 0 were just as new). We fix notmuch to not exclude messages based on a database timestamp of 0.
* Initialize count of new files to zero.Keith Packard2009-11-11
| | | | | | | Leaving this variable uninitialized caused notmuch to display a random number while counting files for the new database. Signed-off-by: Keith Packard <keithp@keithp.com>
* notmuch new: Unbreak after the addition of notmuch-config.Carl Worth2009-11-11
| | | | | | Pull in the code from add-files.c now that notmuch_new_command is the only user, (we no longer have notmuch_setup_command adding any messages).
* notmuch: Break notmuch.c up into several smaller files.Carl Worth2009-11-10
Now that the client sources are alone here in their own directory, (with all the library sources down inside the lib directory), we can break the client up into multiple files without mixing the files up. The hope is that these smaller files will be easier to manage and maintain.