I'm looking into breaking notmuch new up into small transactions.  It wouldn't be much a leap from there to simply close and reopen the database between transactions if another task wants to use it, which would release the lock and let the queued notmuch task have the database for a bit.  It seems silly to have a daemon when all of notmuch's state is already on disk and queue on a lock is as good as a queue in a daemon, but without the accompanying architectural shenanigans.

On Thu, Jan 27, 2011 at 3:35 PM, Jameson Rollins <jrollins@finestructure.net> wrote:
On Thu, 27 Jan 2011 13:40:25 -0500, micah anderson <micah@riseup.net> wrote:
> Due to my harddisk in my laptop being slow (5400RPM), my notmuch
> database growing, and perhaps some fragmentation somewhere, this has
> become *incredibly* annoying for me. I am checking email every 30
> minutes, and I'm nicing and ionicing the processes so I can use my
> machine, but while those processes are running, I'm effectively locked
> out of a good portion of my email.

I also have a very slow disk, but this is very rarely a problem for me.
I retrieve mail every 10 minutes, and the corresponding notmuch new
usually takes a minute or so.  I really haven't found it to be much of a
bother to just wait it out.

One of the suggested ways to develop around this problem would be a
notmuch daemon that would queue database modification requests.  I don't
think anyone has been working on this yet, but if this is a big problem
for you guys, you might start looking into putting one together.

jamie.