unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Mark Walters <markwalters1009@gmail.com>
To: notmuch@notmuchmail.org
Subject: Re: [RFC PATCH v3 00/11] notmuch-pick: an emacs threaded message view with split-pane
Date: Tue, 14 Feb 2012 12:28:48 +0000	[thread overview]
Message-ID: <87haytbnun.fsf@qmul.ac.uk> (raw)
In-Reply-To: <1329096015-8078-1-git-send-email-markwalters1009@gmail.com>


I have now done some benchmarking/profiling of the notmuch-pick
mode. These are all done running locally (i.e., no ssh, nfs or anything)
but on a fairly old computer with a slow hard disk. The timings given
are for the second run (so the files and database are in cache).

The profiling is done by inserting (message "%s" (current-time)) at
various points.

For displaying the thread structure of the whole notmuch mailing list
archive (circa 10,000 messages) it takes about 18 seconds which breaks
down as 6.5 seconds for the cli part, 9.5 seconds for the json parsing
in emacs and 1.5 seconds for constructing the thread structure and
writing the buffer in emacs.

Using Austin's optimised json.el (id:"20110720205007.GB21316@mit.edu")
the 9.5 seconds reduces to about 2.5 seconds (so the total reduces to
about 10.5 seconds).

I think the 6.5 seconds of command line time involves quite a lot of
parsing of the message files (to get the headers) and this could
probably be sped up by storing more of the headers in the database, or
just not outputting all of them. Removing all of the calls to
notmuch_message_get_header seems to reduce the 6.5s to about 1.5s

In other cases, though, notmuch-pick is a noticeable speed win: namely
`picking' is faster than `showing' for longer threads (as one would
expect since pick only gets the thread structure and one message body
whereas show gets the thread structure and all messages bodies). So for
a thread of 170 messages show takes 5 seconds and pick takes less than
0.5 seconds, and for a thread of 30 messages show takes 600 milliseconds
and pick takes takes 150 milliseconds.

Finally, if notmuch-pick were able to do work asynchronously (as
notmuch-search does now) then I think all the speed concerns would go
away. However, I am not sure how to do incremental json parsing.

Best wishes

Mark

  reply	other threads:[~2012-02-14 12:27 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-12 18:49 [RFC PATCH v2 0/3] notmuch-pick: an emacs threaded message view with split-pane Mark Walters
2012-02-12 18:49 ` [RFC PATCH v2 1/3] cli: notmuch-show changes to support pick Mark Walters
2012-02-12 21:08   ` Daniel Schoepe
2012-02-12 22:08   ` Mark Walters
2012-02-12 18:49 ` [RFC PATCH v2 2/3] emacs: changes to other files to support notmuch-pick Mark Walters
2012-02-12 22:27   ` Mark Walters
2012-02-12 18:49 ` [RFC PATCH v2 3/3] emacs: add notmuch-pick itself Mark Walters
2012-02-12 20:39 ` [RFC PATCH v2 0/3] notmuch-pick: an emacs threaded message view with split-pane Jameson Graef Rollins
2012-02-12 21:51   ` Mark Walters
2012-02-13  1:20 ` [RFC PATCH v3 00/11] " Mark Walters
2012-02-14 12:28   ` Mark Walters [this message]
2012-02-14 15:21     ` Austin Clements
2012-02-15  9:27       ` Mark Walters
2012-02-13  1:20 ` [RFC PATCH v3 01/11] cli: add --headers_only option to notmuch-show.c Mark Walters
2012-02-13  1:20 ` [RFC PATCH v3 02/11] cli: add sort options " Mark Walters
2012-02-13  1:20 ` [RFC PATCH v3 03/11] cli: add --thread= option to notmuch-show Mark Walters
2012-02-13  1:20 ` [RFC PATCH v3 04/11] emacs: add entry to notmuch-pick from notmuch-hello.el Mark Walters
2012-02-13  1:20 ` [RFC PATCH v3 05/11] emacs: add defcustom group for notmuch-pick Mark Walters
2012-02-13  1:20 ` [RFC PATCH v3 06/11] emacs: add extra parameters option to notmuch-query-get-threads Mark Walters
2012-02-13  1:20 ` [RFC PATCH v3 07/11] emacs: add entry to notmuch-pick from notmuch.el Mark Walters
2012-02-13  1:20 ` [RFC PATCH v3 08/11] emacs: add the entry to notmuch-pick to notmuch-show.el Mark Walters
2012-02-13  1:20 ` [RFC PATCH v3 09/11] emacs: make notmuch-show return its buffer Mark Walters
2012-02-13  1:20 ` [RFC PATCH v3 10/11] emacs: notmuch-show.el just show the actual matching messages Mark Walters
2012-02-13  1:20 ` [RFC PATCH v3 11/11] emacs: add notmuch-pick itself Mark Walters
2012-02-13  9:05 ` [RFC PATCH v2 0/3] notmuch-pick: an emacs threaded message view with split-pane Aneesh Kumar K.V
2012-02-13 18:16   ` Mark Walters

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=87haytbnun.fsf@qmul.ac.uk \
    --to=markwalters1009@gmail.com \
    --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).