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 E25FB429E21 for ; Sun, 6 Nov 2011 14:30:08 -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 UAdSoxWlDEYy for ; Sun, 6 Nov 2011 14:30:07 -0800 (PST) Received: from mail-fx0-f53.google.com (mail-fx0-f53.google.com [209.85.161.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 05E43431FB6 for ; Sun, 6 Nov 2011 14:30:06 -0800 (PST) Received: by faan15 with SMTP id n15so1784925faa.26 for ; Sun, 06 Nov 2011 14:30:05 -0800 (PST) Received: by 10.223.61.131 with SMTP id t3mr13737950fah.26.1320618605753; Sun, 06 Nov 2011 14:30:05 -0800 (PST) Received: from localhost (dsl-hkibrasgw4-fe5cdc00-23.dhcp.inet.fi. [80.220.92.23]) by mx.google.com with ESMTPS id w11sm28669430fad.7.2011.11.06.14.30.03 (version=SSLv3 cipher=OTHER); Sun, 06 Nov 2011 14:30:04 -0800 (PST) From: Jani Nikula To: Austin Clements Subject: Re: [PATCH] Store "from" and "subject" headers in the database. In-Reply-To: References: <1320599856-24078-1-git-send-email-amdragon@mit.edu> <87k47dt0wo.fsf@nikula.org> User-Agent: Notmuch/0.9+47~gda5693d (http://notmuchmail.org) Emacs/23.3.1 (i686-pc-linux-gnu) Date: Mon, 07 Nov 2011 00:30:01 +0200 Message-ID: <87hb2gubo6.fsf@nikula.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: notmuch@notmuchmail.org, notmuch@kismala.com 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: Sun, 06 Nov 2011 22:30:09 -0000 On Sun, 6 Nov 2011 17:01:14 -0500, Austin Clements wrote: > On Sun, Nov 6, 2011 at 4:07 PM, Jani Nikula wrote: > > On Sun, =C2=A06 Nov 2011 12:17:36 -0500, Austin Clements wrote: > >> Taking full advantage of this requires a database rebuild, but it will > >> fall back to the old behavior for messages that do not have headers > >> stored in the database. > > > > ...what's the most convenient way of rebuilding the database while > > preserving my tags etc.? If this was merged, would an older version of > > notmuch choke on the rebuilt database with these headers? (To me it > > looks like it would be fine.) >=20 > The standard way to rebuild the database is to do a notmuch dump, move > .notmuch out of the way, notmuch new, then notmuch restore. Some day > this process should be made automatic. >=20 > Old versions of notmuch will be blissfully unaware of the new headers > stored in the database. They can even safely add messages to an > upgraded database without breaking new versions of notmuch. Hi, I ran a quick test with/without the patch. I don't have much mail, but on my aging laptop the performance increase is significant. See below. 'du -h' on the .notmuch dir increased from 82M to 83M with the patch, IMHO well worth it. BR, Jani. WITHOUT THE PATCH: $ sudo bash -c "/bin/sync; /bin/echo 3 > /proc/sys/vm/drop_caches" $ time notmuch search "*" | wc -l 8167 real 0m43.216s user 0m3.860s sys 0m2.268s $ time notmuch search "*" | wc -l 8167 real 0m2.762s user 0m2.196s sys 0m0.564s WITH THE PATCH: $ sudo bash -c "/bin/sync; /bin/echo 3 > /proc/sys/vm/drop_caches" $ time notmuch search "*" | wc -l 8167 real 0m8.019s user 0m2.088s sys 0m0.720s $ time notmuch search "*" | wc -l 8167 real 0m2.033s user 0m1.592s sys 0m0.440s