unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: Michael J Gruber <git@grubix.eu>, notmuch@notmuchmail.org
Subject: [PATCH] performance-tests: tests for renamed/copied files in notmuch new
Date: Tue,  2 Apr 2019 09:40:11 -0300	[thread overview]
Message-ID: <20190402124011.16642-1-david@tethera.net> (raw)
In-Reply-To: <587fa8b9dbaa8b8583e83eaa3825e74a24b5ba20.1537284357.git.git@grubix.eu>

Several people have observed that this is surprisingly slow, and we
have a proposal to add tagging into this code path, so we want to make
sure it doesn't imply too much of a performance hit.
---
 performance-test/T00-new.sh | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

I added these tests to help evaluate Michael's propesed patch. I'll send the results in a seperate email.

diff --git a/performance-test/T00-new.sh b/performance-test/T00-new.sh
index 68750129..cec28d58 100755
--- a/performance-test/T00-new.sh
+++ b/performance-test/T00-new.sh
@@ -12,4 +12,34 @@ for i in $(seq 2 6); do
     time_run "notmuch new #$i" 'notmuch new'
 done
 
+manifest=$(mktemp manifestXXXXXX)
+
+count=0
+total=0
+while read -r name ; do
+    if [ $((total % 4 )) -eq 0 ]; then
+        echo $name >> $manifest
+        count=$((count + 1))
+    fi
+    total=$((total + 1))
+done < <(find mail -type f ! -path 'mail/.notmuch/*' )
+
+while read -r name ; do
+    mv $name ${name}.renamed
+done <  $manifest
+
+time_run "new ($count mv)" 'notmuch new'
+
+while read -r name ; do
+    mv ${name}.renamed $name
+done <  $manifest
+
+time_run "new ($count mv back)" 'notmuch new'
+
+while read -r name ; do
+    cp ${name} $name.copy
+done <  $manifest
+
+time_run "new ($count cp)" 'notmuch new'
+
 time_done
-- 
2.20.1

  reply	other threads:[~2019-04-02 12:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-06 14:04 [PATCH] introduce new.rename_tags for renamed (moved) messages Michael J Gruber
2018-09-08  0:47 ` David Bremner
2018-09-18 15:32   ` [PATCH v2] " Michael J Gruber
2019-04-02 12:40     ` David Bremner [this message]
2019-04-02 12:45       ` [PATCH] performance-tests: tests for renamed/copied files in notmuch new David Bremner
2019-04-03 20:05       ` Tomi Ollila
2019-04-05 16:59         ` David Bremner
2019-04-03  1:28     ` [PATCH v2] introduce new.rename_tags for renamed (moved) messages David Bremner
2018-09-21  6:48 ` [PATCH] " Gaute Hope
     [not found]   ` <CAA19uiRXVEp8kPdxUw4yDvVLmG0DSXpxaKKn-ZC0uFC97uJi_Q@mail.gmail.com>
2018-09-21  8:34     ` Gaute Hope

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=20190402124011.16642-1-david@tethera.net \
    --to=david@tethera.net \
    --cc=git@grubix.eu \
    --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).