[PATCH 6/6] cli: lazily create the crypto gpg context only when needed

Austin Clements amdragon at MIT.EDU
Thu May 17 15:29:53 PDT 2012


Quoth Jameson Graef Rollins on May 16 at  2:55 pm:
> Move the creation of the crypto ctx into mime-node.c and create it
> only when needed.  This removes code duplication from notmuch-show and
> notmuch-reply, and should speed up these functions considerably if the
> crypto flags are provided but the messages don't have any
> cryptographic parts.
> ---
>  mime-node.c     |   25 +++++++++++++++++++++++++
>  notmuch-reply.c |   19 -------------------
>  notmuch-show.c  |   23 -----------------------
>  3 files changed, 25 insertions(+), 42 deletions(-)
> 
> diff --git a/mime-node.c b/mime-node.c
> index 8cdabc8..7278c74 100644
> --- a/mime-node.c
> +++ b/mime-node.c
> @@ -182,6 +182,31 @@ _mime_node_create (mime_node_t *parent, GMimeObject *part)

This patch should also update the documentation comment for
mime_node_open.


More information about the notmuch mailing list