From: Gaute Hope <eg@gaute.vetsj.com>
To: notmuch <notmuch@notmuchmail.org>
Subject: Re: github mirror
Date: Mon, 28 Apr 2014 09:44:18 +0200 [thread overview]
Message-ID: <1398670863-sup-1430@qwerzila> (raw)
In-Reply-To: <87y4yq9g4d.fsf@ta.scs.stanford.edu>
Excerpts from David Mazieres's message of 2014-04-28 07:29:06 +0200:
> Austin Clements <amdragon@MIT.EDU> writes:
>
> > As for storing this information directly in messages, in general, the
> > notmuch community is opposed to modifying messages. This causes many
> > problems, and immutable messages are more robust and simplify so many
> > things. IMAP assumes messages are immutable. Maildir assumes
> > messages are immutable. Notmuch new would get dramatically slower if
> > it had to check for messages modifications. What do you do if you
> > change a tag and there are multiple copies of a message? What do you
> > do if there are multiple copies and they disagree about the tags? How
> > do you atomically update the tags stored in a message? From an
> > engineering standpoint, it's much better to avoid mutable messages.
>
> The speed penalty would be very minor in the common case. Muchsync
> scans directories (since it has to scan file contents) and the cost to
> compute SHA-1 hashes of modified files is under 50 msec or something in
> the common case. Extracting tags would be even cheaper. The reason is
> that A) you only need to scan modified directories, and B) you don't
> need to open the file unless the inode, mtime, or size has changed.
> Originally I was going to implement an optimization to detect renamed
> files and avoid computing SHA-1 again (for the case where maildir flags
> have changed), but in the end this wasn't even worth it because the cost
> is so small.
>
> That said, I agree that the complexity of altering files is not worth
> it. Especially since most imap servers will not know about this. Also,
> the question of what do you do with duplicate message IDs (which is
> effectively what you have when the tags disagree) is a more general
> problem still needing a solution, and would be exacerbated by embedding
> important information like tags in the message.
>
> Really what you want is an imap server built on top of the notmuch
> library. That way you could use notmuch from your desktop and then use
> imap from your phone, and everything would stay perfectly in sync.
> Implementing such a server wouldn't be that hard, but it would help if
> notmuch made the _notmuch_message_get_doc_id and
> _notmuch_directory_get_document_id functions semi-public. Then the imap
> server could just use docids as uids. (Plus then muchsync wouldn't have
> to go through gross contortions to get docids information...)
That would be nice, but a solution where the user does not need to run
his own server is in my opinion pretty essential.
- gaute
next prev parent reply other threads:[~2014-04-28 7:45 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-27 11:09 github mirror Sam Halliday
2014-04-27 16:16 ` Jani Nikula
2014-04-27 19:04 ` David Mazieres
2014-04-27 19:33 ` Sam Halliday
2014-04-27 19:45 ` David Mazieres expires 2014-07-26 PDT
2014-04-27 22:37 ` Austin Clements
2014-04-28 5:29 ` David Mazieres
2014-04-28 7:44 ` Gaute Hope [this message]
2014-04-28 8:34 ` David Mazieres
2014-04-28 18:55 ` Sam Halliday
2014-04-28 7:25 ` Sam Halliday
2015-11-21 13:48 ` Tomi Ollila
2015-11-21 16:23 ` Wael M. Nasreddine
2015-11-23 2:15 ` Wael M. Nasreddine
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=1398670863-sup-1430@qwerzila \
--to=eg@gaute.vetsj.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).