Skip to content

Commit 7676aff

Browse files
author
Eric Wong
committed
git-svn: disable _rev_list memoization
This memoization appears unneeded as the check_cherry_pick2 cache is in front of it does enough. With this change applied, importing from local svn+ssh and http copies of the R repo[1] takes only 2:00 (2 hours) on my system and the git-svn process never uses more than 60MB RSS on my x86-64 GNU/Linux system[2]. This 60M measurement is only for the git-svn Perl process itself and does not include memory used by git subprocesses accessing large packs (subprocess memory usage _is_ measured by my time(1) tool). Before this change, an import took longer (2:20) on svn+ssh:// but git-svn used around 240MB during the imports. Worse yet, git-svn ballooned to over 400M when writing out the cache to the filesystem. I also tried removing memoization for `has_no_changes', too, but a local copy of the R repository(*) was not close to finishing within 10 hours on my system. [1] http://svn.r-project.org/R [2] file:// repos causes libsvn to use more memory internally Signed-off-by: Eric Wong <[email protected]> Cc: Hin-Tak Leung <[email protected]>
1 parent aee7d04 commit 7676aff

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

perl/Git/SVN.pm

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1600,7 +1600,6 @@ sub tie_for_persistent_memoization {
16001600
my %lookup_svn_merge_cache;
16011601
my %check_cherry_pick2_cache;
16021602
my %has_no_changes_cache;
1603-
my %_rev_list_cache;
16041603

16051604
tie_for_persistent_memoization(\%lookup_svn_merge_cache,
16061605
"$cache_path/lookup_svn_merge");
@@ -1622,14 +1621,6 @@ sub tie_for_persistent_memoization {
16221621
SCALAR_CACHE => ['HASH' => \%has_no_changes_cache],
16231622
LIST_CACHE => 'FAULT',
16241623
;
1625-
1626-
tie_for_persistent_memoization(\%_rev_list_cache,
1627-
"$cache_path/_rev_list");
1628-
memoize '_rev_list',
1629-
SCALAR_CACHE => 'FAULT',
1630-
LIST_CACHE => ['HASH' => \%_rev_list_cache],
1631-
;
1632-
16331624
}
16341625

16351626
sub unmemoize_svn_mergeinfo_functions {
@@ -1639,7 +1630,6 @@ sub tie_for_persistent_memoization {
16391630
Memoize::unmemoize 'lookup_svn_merge';
16401631
Memoize::unmemoize 'check_cherry_pick2';
16411632
Memoize::unmemoize 'has_no_changes';
1642-
Memoize::unmemoize '_rev_list';
16431633
}
16441634

16451635
sub clear_memoized_mergeinfo_caches {

0 commit comments

Comments
 (0)