]> git.notmuchmail.org Git - sup/commit
maildir speedups
authorBen Walton <bwalton@artsci.utoronto.ca>
Wed, 21 May 2008 01:00:38 +0000 (21:00 -0400)
committerWilliam Morgan <wmorgan-sup@masanjin.net>
Sun, 25 May 2008 02:29:04 +0000 (19:29 -0700)
commit2e06f1ebe80e26ef83170a35fa30248065ff58c0
tree4db695dce8a5882269096aceafae34754a65504f
parent787d8691058b0c20f19087e41d71944365ec4554
maildir speedups

These changes improve the speed of maildir scanning by caching the mtime of the
relevant (cur, new) subdirectories and skipping the poll if the cached mtime
indicates that there are no new files to look at.  We also save a syscall when
creating an id for a maildir entry by calling stat and using its properties
instead of File.mtime and File.size (which are wrappers around a stat call).

Currently, mtimes are cached across session in sources.yaml.  We don't cache
the message id -> filename mapping (yet?) though, so this doesn't currently buy
much.
lib/sup/maildir.rb