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 8E3AD418C36 for ; Sat, 5 Jun 2010 04:14:03 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -1.999 X-Spam-Level: X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001] autolearn=ham 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 Qg-WxKJVO8Wr for ; Sat, 5 Jun 2010 04:13:51 -0700 (PDT) Received: from mail-fx0-f53.google.com (mail-fx0-f53.google.com [209.85.161.53]) by olra.theworths.org (Postfix) with ESMTP id F061A41733F for ; Sat, 5 Jun 2010 04:13:08 -0700 (PDT) Received: by mail-fx0-f53.google.com with SMTP id 4so284086fxm.26 for ; Sat, 05 Jun 2010 04:13:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references; bh=plna9I+05FKqjB+qbwsEIN4orht3eSw5nMN6nWmcNvM=; b=ABmk0ssY32HXiEFRQWhCtfGIfu2WDOgOoNqvFWEFjbCqJKgjSGKVlWSDJGXiuSiorA lDrHLj/ox39tssy4RG2PaCKQhYgewMuug20EP3qbMjXreVaM4KWQOf34mkg2IYwukort rSGZ820ie3G8Ll2e7NqE+PF2hgJ6bWLld6MzI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=rfqrJLi7aG3eiuo26bxaCbSdj8SRfLJ+bZiImBVtrFq8fo017IMQMhw5ZaLxu6yB8r /mmUc/frGs8mWS+ljsD6EeX6m5INSfQHzsmo1hKJK5nwEWbWOnryyX6cqG6Ah1lMEGsr ITvGJNwyZ29s9XTlL9zpl/XtWKy+GrYlK1oRo= Received: by 10.204.46.196 with SMTP id k4mr4880440bkf.72.1275736388571; Sat, 05 Jun 2010 04:13:08 -0700 (PDT) Received: from localhost (a91-153-253-80.elisa-laajakaista.fi [91.153.253.80]) by mx.google.com with ESMTPS id z17sm9580719bkx.18.2010.06.05.04.13.07 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 05 Jun 2010 04:13:08 -0700 (PDT) From: Felipe Contreras To: notmuch@notmuchmail.org Subject: [PATCH 8/9] vim: run(): optimize non-debug path Date: Sat, 5 Jun 2010 14:12:41 +0300 Message-Id: <1275736362-22771-9-git-send-email-felipe.contreras@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1275736362-22771-1-git-send-email-felipe.contreras@gmail.com> References: <1275736362-22771-1-git-send-email-felipe.contreras@gmail.com> Cc: Bart Trojanowski 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: Sat, 05 Jun 2010 11:14:03 -0000 Signed-off-by: Felipe Contreras --- vim/plugin/notmuch.vim | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/vim/plugin/notmuch.vim b/vim/plugin/notmuch.vim index 7b49015..8d5d1c3 100644 --- a/vim/plugin/notmuch.vim +++ b/vim/plugin/notmuch.vim @@ -1186,13 +1186,16 @@ function! s:NM_run(args) call map(words, 's:NM_shell_escape(v:val)') let cmd = g:notmuch_cmd . ' ' . join(words) . '< /dev/null' - let start = reltime() - let out = system(cmd) - let err = v:shell_error - let delta = reltime(start) - if exists('g:notmuch_debug') && g:notmuch_debug + let start = reltime() + let out = system(cmd) + let err = v:shell_error + let delta = reltime(start) + echo printf('[%s] {%s} %s', reltimestr(delta), string(err), string(cmd)) + else + let out = system(cmd) + let err = v:shell_error endif if err -- 1.7.1