unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] dump: Don't sort.
@ 2011-10-29 10:37 Thomas Schwinge
  2011-11-15  1:10 ` David Bremner
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Thomas Schwinge @ 2011-10-29 10:37 UTC (permalink / raw)
  To: notmuch

From: Thomas Schwinge <thomas@schwinge.name>

This improves usage experience considerably in the given scenario.

---


Hi!

I decided that it'd be useful to put the reasoning and data right next to
the source code (as opposed to putting it into the commit message), for
the next guy to read this code has it all in one place.


Grüße,
 Thomas


---

 notmuch-dump.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/notmuch-dump.c b/notmuch-dump.c
index 7e7bc17..a431e23 100644
--- a/notmuch-dump.c
+++ b/notmuch-dump.c
@@ -45,7 +45,12 @@ notmuch_dump_command (unused (void *ctx), int argc, char *argv[])
 	fprintf (stderr, "Out of memory\n");
 	return 1;
     }
-    notmuch_query_set_sort (query, NOTMUCH_SORT_MESSAGE_ID);
+    /* This used to use NOTMUCH_SORT_MESSAGE_ID.  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), the latter
+     * being much more ``database-disk-layout-friendly''.  Subsequently sorting
+     * the 25 MiB of data is a no-brainer, if required.  */
+    notmuch_query_set_sort (query, NOTMUCH_SORT_UNSORTED);
 
     if (argc) {
 	output = fopen (argv[0], "w");
-- 
tg: (3bafdfc..) t/dump_unsorted (depends on: baseline)

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-11-29  7:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-29 10:37 [PATCH] dump: Don't sort Thomas Schwinge
2011-11-15  1:10 ` David Bremner
2011-11-21 11:04   ` Tomi Ollila
2011-11-19 15:11 ` Petter Reinholdtsen
2011-11-28 21:04   ` Thomas Schwinge
2011-11-27 18:40 ` [PATCH] dump: Don't sort the output by message id Tom Prince
2011-11-29  7:10   ` David Bremner

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).