From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id B6D72431FD0 for ; Fri, 30 Dec 2011 02:52:23 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Gaw-7k05jGW0 for ; Fri, 30 Dec 2011 02:52:23 -0800 (PST) Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com [74.125.82.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id B8F18431FB6 for ; Fri, 30 Dec 2011 02:52:22 -0800 (PST) Received: by wgbds13 with SMTP id ds13so19899445wgb.2 for ; Fri, 30 Dec 2011 02:52:21 -0800 (PST) Received: by 10.227.208.134 with SMTP id gc6mr38324709wbb.3.1325242341457; Fri, 30 Dec 2011 02:52:21 -0800 (PST) Received: from hotblack-desiato.hh.sledj.net (host81-149-164-25.in-addr.btopenworld.com. [81.149.164.25]) by mx.google.com with ESMTPS id g12sm24251185wiw.10.2011.12.30.02.52.19 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 30 Dec 2011 02:52:19 -0800 (PST) Received: by hotblack-desiato.hh.sledj.net (Postfix, from userid 30000) id C4ED8A04DF; Fri, 30 Dec 2011 10:52:17 +0000 (GMT) To: Daniel Schoepe , James Vasile , notmuch@notmuchmail.org Subject: Re: [PATCH] Calls to notmuch get queued and executed asynchronously. In-Reply-To: <87wrbykr13.fsf@gilead.invalid> References: <87vddnlxos.wl%james@hackervisions.org> <87wrbykr13.fsf@gilead.invalid> User-Agent: Notmuch/0.10.2+151~gbf1dc2b (http://notmuchmail.org) Emacs/24.0.92.1 (x86_64-pc-linux-gnu) From: David Edmondson Date: Fri, 30 Dec 2011 10:52:17 +0000 Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2011 10:52:23 -0000 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Fri, 21 Oct 2011 22:50:48 +0200, Daniel Schoepe wro= te: > On Tue, 23 Feb 2010 11:32:51 -0500, James Vasile wrote: > > Added notmuch-enqueue-asynch to replace calls to > > notmuch-call-notmuch-process. Calls to notmuch are then queued and > > executed asynchronously. If the db is busy and we get an error saying > > it was locked, keep trying until the db is no longer busy. Errors go > > in a buffer as per usual. >=20 > I discovered this patch a while ago and it almost applies cleanly (the > conflicts are easy to fix though) and it has made the emacs UI for > notmuch _much_ more responsive and enjoyable for me. As discussed on > IRC, issues such as where to handle retries in case the database is > locked should probably be handled in the notmuch binary instead of each > UI. > > I am however unaware of any patches to accomplish that and with the pace > of development / patch reviews the way it is at the moment, this patch > is a really helpful stop-gap (performing calls to notmuch asynchronously > is useful independently of where concurrency issues are handled though) > for me. If someone else agrees, I can fix the conflicts for this patch > and send the revised version to the list. It would be good to have an updated version of this patch if it is still considered useful, though I don't suffer particularly from lag in the emacs UI. One concern is the string searching on the output of 'notmuch' to detect the database locked condition. Perhaps 'notmuch' could be made to return a specific error code in that case, negating the need to string match? --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk79l+EACgkQaezQq/BJZRafjACbBou8X815OQ4Hbd9vhBWH1FFX MDQAnRThDAbfCA1QAHEzFh3aX/hg0CGl =NRqk -----END PGP SIGNATURE----- --=-=-=--