git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] git-svn: save a little memory as fetch progresses

From
EWEric Wong <normalperson@yhbt.net>
Date
Oct 25, 2014, 08:00 UTC
Message-ID
<1414224055-10184-1-git-send-email-normalperson@yhbt.net>

There is no reason to keep entries in the %revs hash after we're done processing a revision, so allow entries become freed as processing continues.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
---
 perl/Git/SVN/Ra.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/perl/Git/SVN/Ra.pm b/perl/Git/SVN/Ra.pm
index e326849..5bc5b4e 100644
--- a/perl/Git/SVN/Ra.pm
+++ b/perl/Git/SVN/Ra.pm
@@ -431,7 +431,7 @@ sub gs_fetch_loop_common {
 
 		my %exists = map { $_->path => $_ } @$gsv;
 		foreach my $r (sort {$a <=> $b} keys %revs) {
-			my ($paths, $logged) = @{$revs{$r}};
+			my ($paths, $logged) = @{delete $revs{$r}};
 
 			foreach my $gs ($self->match_globs(\%exists, $paths,
 			                                   $globs, $r)) {
-- 
EW
Message 1 of 1 in “git-svn: save a little memory as fetch progresses”
  1. git-svn: save a little memory as fetch progressesEric Wong, Oct 25, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.