Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 23CE3431FBD; Thu, 10 Dec 2009 21:13:09 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 AGU-VliYYTt7; Thu, 10 Dec 2009 21:13:08 -0800 (PST) Received: from yoom.home.cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 389B4431FAE; Thu, 10 Dec 2009 21:13:08 -0800 (PST) Received: by yoom.home.cworth.org (Postfix, from userid 1000) id 6ACB7254312; Thu, 10 Dec 2009 21:13:07 -0800 (PST) From: Carl Worth To: Kan-Ru Chen , notmuch In-Reply-To: <87r5r3joth.fsf@anar.kanru.info> References: <87r5r3joth.fsf@anar.kanru.info> Date: Thu, 10 Dec 2009 21:13:07 -0800 Message-ID: <87638e3xgc.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Subject: Re: [notmuch] Patch for xapian defect #250 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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, 11 Dec 2009 05:13:09 -0000 --=-=-= On Thu, 10 Dec 2009 15:00:42 +0800, Kan-Ru Chen wrote: > The termlist is already sorted, so this is the patch trying to minimize > the modification of database as suggested in the comment and Carl's > TODO file. Fantastic, Kan-Ru! > My poor profiling shows not much, but some improvement. Now you're just understating for sake of the pun. A 5-6x performance improvement looks great. And I see that as well in my testing: Before: $ time notmuch tag +foo tag:sent real 3m18.067s $ time notmuch tag -foo tag:sent real 3m12.940s After: $ time notmuch tag +foo tag:sent real 0m31.497s $ time notmuch tag -foo tag:sent real 0m28.722s I didn't flush the OS caches between runs, but a subsequent run of the "before" code still performed similarly slow: $ time notmuch tag +foo tag:sent real 3m7.172s And if I *had* used cold caches for every run the benefit of the patch would have looked even better. Anyway, we should get this upstream to the Xapian folks straight away. I expect they'll want to see a patch to the chert backend as well as the flint backend, (but fortunately the relevant code looks very similar if not identical). Thanks again, -Carl --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iD8DBQFLIdTj6JDdNq8qSWgRAqquAKCB0fSF8muocnJgef2x7ys690YIsACdFjy7 VxqxAhPKxdKXPpx0k1qm+tw= =7xLg -----END PGP SIGNATURE----- --=-=-=--