unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Ethan Glasser-Camp <ethan.glasser.camp@gmail.com>
To: Sascha Silbe <sascha-ml-reply-to-2012-3@silbe.org>,
	notmuch <notmuch@notmuchmail.org>
Subject: Re: [PATCH 3/3] new: don't read unchanged directories from disk
Date: Mon, 15 Oct 2012 20:13:01 -0400	[thread overview]
Message-ID: <87y5j78eb6.fsf@betacantrips.com> (raw)
In-Reply-To: <1340555366-25891-4-git-send-email-sascha-pgp@silbe.org>

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

  reply	other threads:[~2012-10-16  0:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-24 16:29 [PATCH 0/3] Speed up notmuch new for unchanged directories Sascha Silbe
2012-06-24 16:29 ` [PATCH 1/3] lib: fix NULL checks for filenames iterators Sascha Silbe
2012-09-02  2:34   ` David Bremner
2012-06-24 16:29 ` [PATCH 2/3] lib: add support for rewinding a filenames iterator Sascha Silbe
2012-06-24 16:29 ` [PATCH 3/3] new: don't read unchanged directories from disk Sascha Silbe
2012-10-16  0:13   ` Ethan Glasser-Camp [this message]
2012-06-25 17:59 ` [PATCH 0/3] Speed up notmuch new for unchanged directories Austin Clements
2012-06-25 22:13   ` Sascha Silbe
2012-06-26  1:47     ` Austin Clements
2012-07-05  7:37       ` Sascha Silbe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y5j78eb6.fsf@betacantrips.com \
    --to=ethan.glasser.camp@gmail.com \
    --cc=notmuch@notmuchmail.org \
    --cc=sascha-ml-reply-to-2012-3@silbe.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).