Re: Change duplicate priority?

2023-09-30 Thread David Bremner
Jesse Rosenthal  writes:

>
> Depending on how long the scan takes, getmail might pull down both of
> these emails. The second duplicate is available through the emacs change
> index command, but the attachment is not available (since it tries to
> pull the first attachment from the first version, which is just an html
> part).

Hmm. That seems like a bug, the attachement should be drawn from the
"current" version. I will see if I can replicate this with a simple test
case.

> I can usually solve this by deleting the first one by hand, something
> like:
>
> notmuch search --output=files id: | head -1 | xargs rm
>
> This has a couple of problems, though. (1) It's relying on the Maildir file
> name being a time stamp to get rid of the earlier file, and (2) it
> doesn't actually reindex the file when I run notmuch new, just treating
> it as a rename, so I still get the search results for the older deleted
> file.

What if you use notmuch-reindex instead of notmuch-new after the deletion?

___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


[PATCH] perf-test/tag: add maildir sync tests

2023-09-30 Thread David Bremner
Today someone asked me the (reasonable) question of how much
performance impact there is from synching tags to maildir flags. It
turns out it is noticeable, about a 50% overhead compared to
non-synched tags (according to these tests).  In practice I don't know
if it's a big problem for users, since I don't know what fraction of
tagging operations involve "special" tags.
---
 performance-test/T02-tag.sh | 9 +
 1 file changed, 9 insertions(+)

diff --git a/performance-test/T02-tag.sh b/performance-test/T02-tag.sh
index 9c895d6a..47fdb0c2 100755
--- a/performance-test/T02-tag.sh
+++ b/performance-test/T02-tag.sh
@@ -11,4 +11,13 @@ time_run 'tag * +existing_tag' "notmuch tag +new_tag '*'"
 time_run 'tag * -existing_tag' "notmuch tag -new_tag '*'"
 time_run 'tag * -missing_tag' "notmuch tag -new_tag '*'"
 
+time_run 'tag * +maildir_flag F' "notmuch tag +flagged '*'"
+time_run 'tag * -maildir_flag F' "notmuch tag -flagged '*'"
+time_run 'tag * +maildir_flag P' "notmuch tag +passed '*'"
+time_run 'tag * -maildir_flag P' "notmuch tag -passed '*'"
+time_run 'tag * +maildir_flag D' "notmuch tag +draft '*'"
+time_run 'tag * -maildir_flag D' "notmuch tag -draft '*'"
+time_run 'tag * +maildir_flag S' "notmuch tag -unread '*'"
+time_run 'tag * -maildir_flag S' "notmuch tag +unread '*'"
+
 time_done
-- 
2.40.1

___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org