Sascha Silbe <sascha-pgp@silbe.org> writes: > Previously, notmuch new listed all directories on disk, even if they > were unchanged from the state recorded in the database. This could take > a huge amount of time for large numbers of mails as it would list each > individual mail. > > By iterating over the subdirectories recorded in the database we can > avoid accessing the file system for each unchanged directory. If the > modification time does not match we fall back to a full file system scan > so new subdirectories will get picked up and scanned recursively. Hi! Just going through the patch queue. These patches look fine to me, but I think architecturally, notmuch needs to decide what it wants to do -- if it wants to optimize directory-rescanning, or if it wants to provide a better way to just add files known to be new, and let mail delivery hook into that system. I'd prefer the second, but I think it's OK to merge working code that does the first in the meantime. The perfect is the enemy of the good. Austin raised some concerns on this patch set that I'm not sure were completely addressed. For my part, it seems intuitive that a stat() would be faster than a scandir() and so I would have no problem with merging this series. Ethan