From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 99A8D6DE0C66 for ; Tue, 2 Apr 2019 05:40:23 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.022 X-Spam-Level: X-Spam-Status: No, score=-0.022 tagged_above=-999 required=5 tests=[AWL=-0.021, SPF_PASS=-0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zl46-iOSKL2Y for ; Tue, 2 Apr 2019 05:40:22 -0700 (PDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id 853D46DE0A7E for ; Tue, 2 Apr 2019 05:40:22 -0700 (PDT) Received: from remotemail by fethera.tethera.net with local (Exim 4.89) (envelope-from ) id 1hBIi8-00013q-6z; Tue, 02 Apr 2019 08:40:16 -0400 Received: (nullmailer pid 16699 invoked by uid 1000); Tue, 02 Apr 2019 12:40:14 -0000 From: David Bremner To: Michael J Gruber , notmuch@notmuchmail.org Subject: [PATCH] performance-tests: tests for renamed/copied files in notmuch new Date: Tue, 2 Apr 2019 09:40:11 -0300 Message-Id: <20190402124011.16642-1-david@tethera.net> X-Mailer: git-send-email 2.20.1 In-Reply-To: <587fa8b9dbaa8b8583e83eaa3825e74a24b5ba20.1537284357.git.git@grubix.eu> References: <587fa8b9dbaa8b8583e83eaa3825e74a24b5ba20.1537284357.git.git@grubix.eu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 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, 02 Apr 2019 12:40:23 -0000 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