Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 86580431FC2 for ; Thu, 17 May 2012 15:29:56 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DPGqdNiBvjti for ; Thu, 17 May 2012 15:29:56 -0700 (PDT) Received: from dmz-mailsec-scanner-7.mit.edu (DMZ-MAILSEC-SCANNER-7.MIT.EDU [18.7.68.36]) by olra.theworths.org (Postfix) with ESMTP id 1B848431FAE for ; Thu, 17 May 2012 15:29:56 -0700 (PDT) X-AuditID: 12074424-b7fae6d000000906-72-4fb57be36946 Received: from mailhub-auth-1.mit.edu ( [18.9.21.35]) by dmz-mailsec-scanner-7.mit.edu (Symantec Messaging Gateway) with SMTP id F6.D7.02310.3EB75BF4; Thu, 17 May 2012 18:29:55 -0400 (EDT) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id q4HMTtC5027501; Thu, 17 May 2012 18:29:55 -0400 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91]) (authenticated bits=0) (User authenticated as amdragon@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q4HMTr2h011402 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Thu, 17 May 2012 18:29:54 -0400 (EDT) Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77) (envelope-from ) id 1SV9Cj-0003V8-Ov; Thu, 17 May 2012 18:29:53 -0400 Date: Thu, 17 May 2012 18:29:53 -0400 From: Austin Clements To: Jameson Graef Rollins Subject: Re: [PATCH 6/6] cli: lazily create the crypto gpg context only when needed Message-ID: <20120517222953.GR11804@mit.edu> References: <1337205359-2444-1-git-send-email-jrollins@finestructure.net> <1337205359-2444-2-git-send-email-jrollins@finestructure.net> <1337205359-2444-3-git-send-email-jrollins@finestructure.net> <1337205359-2444-4-git-send-email-jrollins@finestructure.net> <1337205359-2444-5-git-send-email-jrollins@finestructure.net> <1337205359-2444-6-git-send-email-jrollins@finestructure.net> <1337205359-2444-7-git-send-email-jrollins@finestructure.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1337205359-2444-7-git-send-email-jrollins@finestructure.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpkleLIzCtJLcpLzFFi42IR4hRV1n1cvdXfYMcRI4s9+7wsrt+cyezA 5HH3NJfHs1W3mAOYorhsUlJzMstSi/TtErgyth18yFZwha1icetR5gbGraxdjJwcEgImEvtn b2WDsMUkLtxbD2RzcQgJ7GOU+PjgJiuEs4FRYvuednYI5ySTxOKGpUwQzhJGidst61hA+lkE VCUm7ZoJZrMJaEhs27+cEcQWETCT6PnyB8xmFtCS2LrxA5gtLBAq8bDhA9gdvAI6Eg0zDrKD 2EAbmCU+3imHiAtKnJz5hAWm98a/l0CLOYBsaYnl/zhATE4BL4ntB1NBKkQFVCSmnNzGNoFR aBaS5llImmchNC9gZF7FKJuSW6Wbm5iZU5yarFucnJiXl1qka66Xm1mil5pSuokRFNLsLio7 GJsPKR1iFOBgVOLhDTq12V+INbGsuDL3EKMkB5OSKO+Tyq3+QnxJ+SmVGYnFGfFFpTmpxYcY JTiYlUR496sD5XhTEiurUovyYVLSHCxK4rwaWu/8hATSE0tSs1NTC1KLYLIyHBxKErwxwNgV EixKTU+tSMvMKUFIM3FwggznARoeB1LDW1yQmFucmQ6RP8WoKCXO6w+SEABJZJTmwfXCUs4r RnGgV4R5q0CqeIDpCq77FdBgJqDBZbmbQAaXJCKkpBoYu2YHSa/6s3jpRO9Cz8ci1wPP/Hp9 iG36s4C5C9OyFrhFZ74MfSW9ULLjxL2iZzZr3jC39XDEq93/FTVlQcR/0Ycrj64pc3Q4+8J+ zqLqrjf3ogMq7q/rSAx4eJgxtrfyo4JU6guLe/c7L5+4ovz1mBWbi27Gj/CrXgxTHRRdNgYc WpE5aVJSuxJLcUaioRZzUXEiACIBGIwUAwAA Cc: Notmuch Mail X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2012 22:29:56 -0000 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.