unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH 0/2] Allow JSON to use non-entire thread, and use for elide
@ 2012-04-10 17:04 Mark Walters
  2012-04-10 17:04 ` [PATCH 1/2] cli: make --entire-thread=false work for format=json Mark Walters
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Mark Walters @ 2012-04-10 17:04 UTC (permalink / raw)
  To: notmuch

These two patches supersede the series [1] and the first patch
replaces [2].

The first patch allows --entire-thread=false for notmuch-show.c when
the output format is JSON. In the previous version [2] Austin
suggested that we should output an empty message (i.e., {}) for
non-matching messages rather than just omitting them. This version
does that.

Note the first patch is entirely functional without the second.

The second patch uses the first to implement the "elide" functionality
in the emacs interface on the cli-side rather than on the emacs
side. This is substantially faster in some cases. In current emacs
show view it is a relatively small speed-up which is only noticable
with large threads. However, it will be used by notmuch-pick [3] and
there the speed up will be important. (I have a current version of
notmuch-pick which I will submit in the near future.)

Best wishes

Mark


[1] id:"1330033294-21980-1-git-send-email-markwalters1009@gmail.com"
[2] id:"1331377533-30262-3-git-send-email-markwalters1009@gmail.com"
[3] id:"1329072579-27340-1-git-send-email-markwalters1009@gmail.com"

Mark Walters (2):
  cli: make --entire-thread=false work for format=json.
  emacs: make elide messages use notmuch-show for omitting messages.

 emacs/notmuch-show.el |   17 +++++++++--------
 notmuch-show.c        |   33 ++++++++++++++++++++++++++++-----
 2 files changed, 37 insertions(+), 13 deletions(-)

-- 
1.7.9.1

^ permalink raw reply	[flat|nested] 9+ messages in thread
* [PATCH 0/2] Make elide messages use cli side
@ 2012-02-23 21:41 Mark Walters
  2012-02-23 21:41 ` [PATCH 2/2] emacs: make elide messages use notmuch-show for omitting messages Mark Walters
  0 siblings, 1 reply; 9+ messages in thread
From: Mark Walters @ 2012-02-23 21:41 UTC (permalink / raw)
  To: notmuch

Currently the elide messages option in notmuch-show.el fetches all
messages in the thread (via notmuch-show.c) parses the JSON and throws 
away all the non-matching messages.

This patch removes the entire-thread assumption for format=json from 
notmuch-show.c. This allows the emacs code to call notmuch-show with 
out the --entire-thread flag and just receive the matching messages 
(but with the full thread structure) in return. 

This makes notmuch-show.c much faster (but in practice this is small
anyway) but more importantly substantially improves the speed of the
JSON parsing. Rough wall clock timing on my system shows (best case) a
4 second time for showing a large thread (170 messages) reduced to an
almost instant time for a single matching message from that thread.

For the existing show view the gain is nice but not critical. However,
notmuch-pick shows a single message at a time and the speed increase
will be needed there.

Best wishes

Mark



Mark Walters (2):
  emacs/cli: remove entire-thread default from show: JSON
  emacs: make elide messages use notmuch-show for omitting messages.

 emacs/notmuch-show.el |   15 +++++++++------
 notmuch-show.c        |    1 -
 2 files changed, 9 insertions(+), 7 deletions(-)

-- 
1.7.2.3

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

end of thread, other threads:[~2012-04-14 20:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-10 17:04 [PATCH 0/2] Allow JSON to use non-entire thread, and use for elide Mark Walters
2012-04-10 17:04 ` [PATCH 1/2] cli: make --entire-thread=false work for format=json Mark Walters
2012-04-10 17:19   ` Adam Wolfe Gordon
2012-04-10 20:52     ` Mark Walters
2012-04-10 17:04 ` [PATCH 2/2] emacs: make elide messages use notmuch-show for omitting messages Mark Walters
2012-04-10 20:48   ` [PATCH] " Mark Walters
2012-04-14 20:54 ` [PATCH 0/2] Allow JSON to use non-entire thread, and use for elide Jameson Graef Rollins
2012-04-14 20:55   ` Jameson Graef Rollins
  -- strict thread matches above, loose matches on Subject: below --
2012-02-23 21:41 [PATCH 0/2] Make elide messages use cli side Mark Walters
2012-02-23 21:41 ` [PATCH 2/2] emacs: make elide messages use notmuch-show for omitting messages Mark Walters

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