author | Sam Vilain <sam@vilain.net> | |
Sat, 19 Dec 2009 11:55:13 +0000 (00:55 +1300) | ||
committer | Eric Wong <normalperson@yhbt.net> | |
Mon, 21 Dec 2009 10:32:48 +0000 (02:32 -0800) | ||
commit | 7d944c3399c4145293d599e1ddc76d1ac0c1e118 | |
tree | 4850db3279150a4225b6d93c423c3f726aedee7d | tree | snapshot |
parent | 1d144aa25edbb4dcda88abbaef8f336108b8d788 | commit | diff |
git-svn: memoize conversion of SVN merge ticket info to git commit ranges
Each time the svn mergeinfo ticket changes, we look it up in the rev_map;
when there are a lot of merged branches, this will result in many repeated
lookups of the same information for subsequent commits. Arrange the slow
part of the function so that it may be memoized, and memoize it. The more
expensive revision walking operation can be memoized separately.
[ew: changed "next" to "return" for function exit]
Signed-off-by: Sam Vilain <sam@vilain.net>
Acked-by: Eric Wong <normalperson@yhbt.net>
Each time the svn mergeinfo ticket changes, we look it up in the rev_map;
when there are a lot of merged branches, this will result in many repeated
lookups of the same information for subsequent commits. Arrange the slow
part of the function so that it may be memoized, and memoize it. The more
expensive revision walking operation can be memoized separately.
[ew: changed "next" to "return" for function exit]
Signed-off-by: Sam Vilain <sam@vilain.net>
Acked-by: Eric Wong <normalperson@yhbt.net>
git-svn.perl | diff | blob | history |