From: Jed Brown <jed@59A2.org>
To: Keith Packard <keithp@keithp.com>, Carl Worth <cworth@cworth.org>,
notmuch@notmuchmail.org
Subject: Re: notmuch 'index' mode.
Date: Tue, 24 Nov 2009 11:20:02 +0100 [thread overview]
Message-ID: <87tywkp6lp.fsf@59A2.org> (raw)
In-Reply-To: <yuniqd0oae9.fsf@aiko.keithp.com>
On Mon, 23 Nov 2009 19:43:26 -0800, Keith Packard <keithp@keithp.com> wrote:
> On Mon, 23 Nov 2009 19:16:54 -0800, Carl Worth <cworth@cworth.org> wrote:
> > Then tags become something that are just for manual manipulation. What
> > do you think?
I really think this is the way to go.
> And disadvantages as searching might actually be slow at some point?
If this happens, there is nothing to prevent notmuch from caching the
search by actually writing a corresponding tag. This could be made
automatic by logging the cost of each named search (and perhaps the
frequency of making that search), and using a tradeoff function to
decide which searches to optimize. Once a search was selected for
optimization, there are at least two alternatives, depending on which
queries xapian can answer quickly.
1. Log the time and spawn an asynchronous notmuch tag process. Searches
for
vtag:named-search
(vtag: doesn't need to be a keyword, but I'm only distinguishing here
for clarity) which was normally translated into
long search expression
becomes
tag:named-search OR newer:timestamp AND (long search expression)
This option guarantees that notmuch new remains fast and simple because
it does no special tagging, but this query might not be any better.
2. Inform notmuch new that it should apply the chosen tag to messages
matching the query and spawn the asynchronous notmuch tag process. Once
the tag process has finished, searches for vtag:named-search are
translated to tag:named-search. This implies concurrent modification of
the database, otherwise it would cause a stall in incoming mail (not
important if mass tagging somehow became faster).
Admittedly my archive is not huge (100k messages in 3.5 GB plus 1.1 GB
for .notmuch) but queries returning a reasonable number of messages are
still quite fast. Additionally, searches for tags do not seem to be
greatly faster than queries for complex queries returning a similar
number of results.
Jed
next prev parent reply other threads:[~2009-11-24 10:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-21 7:35 notmuch 'index' mode Keith Packard
2009-11-23 6:06 ` Carl Worth
2009-11-23 7:18 ` Keith Packard
2009-11-24 3:16 ` Carl Worth
2009-11-24 3:43 ` Keith Packard
2009-11-24 10:20 ` Jed Brown [this message]
2009-11-24 12:14 ` Jan Janak
2009-11-24 16:38 ` Keith Packard
2009-11-24 17:14 ` Jed Brown
2009-11-24 17:51 ` Jan Janak
2009-11-24 23:40 ` Bart Trojanowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tywkp6lp.fsf@59A2.org \
--to=jed@59a2.org \
--cc=cworth@cworth.org \
--cc=keithp@keithp.com \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).