git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Alejandro R. Sedeño" <asedeno@mit.edu>
To: git@vger.kernel.org, Eric Wong <normalperson@yhbt.net>
Cc: "James Y Knight" <jknight@itasoftware.com>,
	"Alejandro R. Sedeño" <asedeno@mit.edu>
Subject: [PATCH 2/2] git-svn: Cache results of running the executable "git config"
Date: Fri,  1 Apr 2011 14:42:16 -0400	[thread overview]
Message-ID: <1301683336-10832-3-git-send-email-asedeno@mit.edu> (raw)
In-Reply-To: <1301683336-10832-1-git-send-email-asedeno@mit.edu>

From: James Y Knight <jknight@itasoftware.com>

Running programs is not cheap!

Signed-off-by: Alejandro R. Sedeño <asedeno@mit.edu>
---
 git-svn.perl |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/git-svn.perl b/git-svn.perl
index aa41896..e47e04c 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -59,6 +59,7 @@ use File::Find;
 use Getopt::Long qw/:config gnu_getopt no_ignore_case auto_abbrev/;
 use IPC::Open3;
 use Git;
+use Memoize;  # core since 5.8.0, Jul 2002
 
 BEGIN {
 	# import functions from Git into our packages, en masse
@@ -72,6 +73,8 @@ BEGIN {
 			*{"${package}::$_"} = \&{"Git::$_"};
 		}
 	}
+	Memoize::memoize 'Git::config';
+	Memoize::memoize 'Git::config_bool';
 }
 
 my ($SVN);
@@ -3199,6 +3202,8 @@ sub has_no_changes {
 		Memoize::unmemoize 'check_cherry_pick';
 		Memoize::unmemoize 'has_no_changes';
 	}
+
+	Memoize::memoize 'Git::SVN::repos_root';
 }
 
 END {
-- 
1.7.4.2.1.gd6f1f

  parent reply	other threads:[~2011-04-01 18:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-01 18:42 a couple of git-svn patches Alejandro R. Sedeño
2011-04-01 18:42 ` [PATCH 1/2] git-svn: Fix the commit-url config to be the base url, just like the url config Alejandro R. Sedeño
2011-04-01 18:42 ` Alejandro R. Sedeño [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-04-04 19:09 [PATCHv2 0/2] a couple of git-svn patches Alejandro R. Sedeño
2011-04-04 19:09 ` [PATCH 2/2] git-svn: Cache results of running the executable "git config" Alejandro R. Sedeño
2011-04-04 21:53   ` Eric Wong
     [not found]     ` <7voc4l5hm5.fsf@alter.siamese.dyndns.org>
2011-04-05  8:15       ` Junio C Hamano

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1301683336-10832-3-git-send-email-asedeno@mit.edu \
    --to=asedeno@mit.edu \
    --cc=git@vger.kernel.org \
    --cc=jknight@itasoftware.com \
    --cc=normalperson@yhbt.net \
    /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.
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 NNTP newsgroup(s).