]> git.cworth.org Git - notmuch/commit
dump: Don't sort the output by message id.
authorThomas Schwinge <thomas@schwinge.name>
Sun, 27 Nov 2011 18:40:53 +0000 (13:40 -0500)
committerDavid Bremner <bremner@debian.org>
Mon, 28 Nov 2011 15:57:45 +0000 (07:57 -0800)
commit3a0a7303368a515acc8e73bd211818e852b7e18c
tree693945c7df075249f8d81990d25d1547bf8d329e
parentda67bf12ce122759f72d1d510fb8996df3c9f946
dump: Don't sort the output by message id.

Asking xapian to sort the messages for us causes suboptimal IO patterns. This
would be useful, if we only wanted the first few results, but since we want
everything anyway, this is pessimization.

On 2011-10-29, a measurement on a 372981 messages instance showed that wall
time can be reduced from 28 minutes (sorted by Message-ID) to 15 minutes
(unsorted).

Timings on 189605 messages:

$ time notmuch.old dump
19.48user 5.83system 12:10.42elapsed 3%CPU (0avgtext+0avgdata 110656maxresident)k
3629584inputs+22720outputs (33major+7073minor)pagefaults 0swaps
$ echo 3 > /proc/sys/vm/drop_caches
$ time notmuch.new
14.89user 1.20system 3:23.58elapsed 7%CPU (0avgtext+0avgdata 46032maxresident)k
1256264inputs+22464outputs (43major+1990minor)pagefaults 0swaps
notmuch-dump.c