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

[patch] git svn slowness on win32

From
JRjosh robb <josh_robb@fastmail.fm>
Date
Feb 16, 2010, 10:04 UTC
Message-ID
<13237f021002160204o3c8af7a6i3e7105bd6bc43fa3@mail.gmail.com>
Hi,

I'm using git svn (1.6.4.msysgit.0) within a WindowsXP VM running under VMWare fusion on OSX 10.5. For me (and at least one other person I know) git svn has been unbearably slow.

My profiling shows that almost all of the git-svn runtime is being spent in DynaLoader (via SVN::Base::import) which I guess is slow in a virtualized windows environment. For example:

$ time perl /libexec/git-core/git-svn rebase Current branch master is up to date.

real 2m56.750s user 0m3.129s sys 2m39.232s

I've been able to make significant (an order of magnitude) improvements to it's performance by delaying SVN::Base::import from running until it's actually needed. After making this change:

$ time perl /libexec/git-core/git-svn rebase Current branch master is up to date.

real 0m33.407s user 0m1.409s sys 0m23.054s

git svn rebase -n goes from 3m7.046s to 0m10.312s.
Would love to get some feedback/thoughts etc...
j.

--- git-svn.orig Wed Jul 29 22:55:26 2009 +++ git-svn Fri Dec 4 13:38:52 2009

@@ -27,11 +27,13 @@
 $| = 1; # unbuffer STDOUT
 
 sub fatal (@) { print STDERR "@_\n"; exit 1 }
-require SVN::Core; # use()-ing this causes segfaults for me... *shrug*
-require SVN::Ra;
-require SVN::Delta;
-if ($SVN::Core::VERSION lt '1.1.0') {
-	fatal "Need SVN::Core 1.1.0 or better (got $SVN::Core::VERSION)";
+sub _req_svn {
+	require SVN::Core; # use()-ing this causes segfaults for me... *shrug*
+	require SVN::Ra;
+	require SVN::Delta;
+	if ($SVN::Core::VERSION lt '1.1.0') {
+		fatal "Need SVN::Core 1.1.0 or better (got $SVN::Core::VERSION)";
+	}
 }
 my $can_compress = eval { require Compress::Zlib; 1};
 push @Git::SVN::Ra::ISA, 'SVN::Ra';
@@ -4379,6 +4381,8 @@
 	my ($class, $url) = @_;
 	$url =~ s!/+$!!;
 	return $RA if ($RA && $RA->{url} eq $url);
+
+	::_req_svn();
 
 	SVN::_Core::svn_config_ensure($config_dir, undef);
 	my ($baton, $callbacks) = SVN::Core::auth_open_helper(_auth_providers);
Next: Johannes Schindelin
Message 1 of 3 in “git svn slowness on win32”
  1. git svn slowness on win32josh robb, Feb 16, 2010
  2. Johannes SchindelinFeb 16, 2010
  3. Eric WongFeb 17, 2010

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.