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 546C4429E5B for ; Tue, 31 Jan 2012 08:26:04 -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 x4Um6ujzGT8w for ; Tue, 31 Jan 2012 08:26:03 -0800 (PST) Received: from dmz-mailsec-scanner-6.mit.edu (DMZ-MAILSEC-SCANNER-6.MIT.EDU [18.7.68.35]) by olra.theworths.org (Postfix) with ESMTP id 94F5A429E25 for ; Tue, 31 Jan 2012 08:26:03 -0800 (PST) X-AuditID: 12074423-b7f9c6d0000008c3-d8-4f28161bc839 Received: from mailhub-auth-3.mit.edu ( [18.9.21.43]) by dmz-mailsec-scanner-6.mit.edu (Symantec Messaging Gateway) with SMTP id 37.9C.02243.B16182F4; Tue, 31 Jan 2012 11:26:03 -0500 (EST) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id q0VGQ2pK029324; Tue, 31 Jan 2012 11:26:02 -0500 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91]) (authenticated bits=0) (User authenticated as amdragon@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q0VGQ0oU028485 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Tue, 31 Jan 2012 11:26:02 -0500 (EST) Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77) (envelope-from ) id 1RsGW2-0004CC-UT; Tue, 31 Jan 2012 11:25:06 -0500 Date: Tue, 31 Jan 2012 11:25:06 -0500 From: Austin Clements To: Mark Walters Subject: Re: [PATCH 3/7] lib: Make notmuch_query_search_messages set the exclude flag Message-ID: <20120131162506.GE10898@mit.edu> References: <8762fu4aqt.fsf@qmul.ac.uk> <1327862394-14334-3-git-send-email-markwalters1009@gmail.com> <20120131044352.GZ17991@mit.edu> <87y5soccyi.fsf@qmul.ac.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87y5soccyi.fsf@qmul.ac.uk> User-Agent: Mutt/1.5.21 (2010-09-15) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprAKsWRmVeSWpSXmKPExsUixCmqrSstpuFvsO0Gm8XquTwW12/OZHZg 8tg56y67x7NVt5gDmKK4bFJSczLLUov07RK4Mn69vsVacIenYnJTM0sDYyNXFyMnh4SAicTx n53MELaYxIV769m6GLk4hAT2MUrMurmFHcLZwCjxdvEpqMxJJomPr75AOUsYJVqn/WEF6WcR UJV4+WA2O4jNJqAhsW3/ckYQW0RAR+L2oQVgcWYBaYlvv5uZQGxhgXCJRX++s4DYvEA1ay/+ ZIUYuoJRoufYV3aIhKDEyZlPWCCatSRu/HsJ1MwBNmj5Pw6QMCfQrtWdk9hAbFEBFYkpJ7ex TWAUmoWkexaS7lkI3QsYmVcxyqbkVunmJmbmFKcm6xYnJ+blpRbpmunlZpbopaaUbmIEBTa7 i/IOxj8HlQ4xCnAwKvHw7nyv5i/EmlhWXJl7iFGSg0lJlPe7oIa/EF9SfkplRmJxRnxRaU5q 8SFGCQ5mJRHeN6uBynlTEiurUovyYVLSHCxK4rwaWu/8hATSE0tSs1NTC1KLYLIyHBxKErwT RYGGChalpqdWpGXmlCCkmTg4QYbzAA1fAVLDW1yQmFucmQ6RP8Woy9H+dvd5RiGWvPy8VClx 3rkgRQIgRRmleXBzYAnpFaM40FvCvCtBqniAyQxu0iugJUxAS54zqIIsKUlESEk1MCZNj+Nq 6c+a+Y3d05Y/1Eg4fU5p8zHptec3Zul1f1A3XHDFk32mhyhnXXm74C+2Ca57XXO+XjtZZRyZ LWujdy99Q2bie9mMo3LX35a1XJ11PHodY/bDE+lVwbKaQvtNeB9If92w7Y+wwbV5YY0ep75O Aaax+Mk7JvSrduzO5PJRkBT6mtuhxFKckWioxVxUnAgAsP8KhSMDAAA= Cc: notmuch@notmuchmail.org 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: Tue, 31 Jan 2012 16:26:04 -0000 Quoth Mark Walters on Jan 31 at 11:45 am: > On Mon, 30 Jan 2012 23:43:52 -0500, Austin Clements wrote: > > Quoth Mark Walters on Jan 29 at 6:39 pm: > > > notmuch_message_node_t *iterator; > > > }; > > > > > > diff --git a/lib/notmuch.h b/lib/notmuch.h > > > index 7929fe7..740d005 100644 > > > --- a/lib/notmuch.h > > > +++ b/lib/notmuch.h > > > @@ -449,6 +449,11 @@ typedef enum { > > > const char * > > > notmuch_query_get_query_string (notmuch_query_t *query); > > > > > > +/* specify whether to results should omit the excluded results rather > > > + * than just marking them excluded */ > > > +void > > > +notmuch_query_set_omit_excluded_messages (notmuch_query_t *query, notmuch_bool_t omit); > > > + > > > > I don't think we should add this API. The library behavior will not > > change for library users that don't use excludes and library users > > that do use excludes should by aware of the excluded flag and do the > > appropriate thing. > > > > I can see why this is handy in some cases, but I don't think it > > provides enough utility to warrant becoming part of the permanent and > > minimal library interface. > > This is really a performance improvement: suppose that there are lots of > threads that only match in excluded messages. Then without this flag we > will spend lots of time constructing the thread only for it to be > ignored. (In contrived situations this could be arbitrarily slower.) I would prefer to keep the public API minimal and only introduce something like this if people actually experience performance problems.